Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Vertex Array crash at the release executable  (Read 1369 times)

0 Members and 1 Guest are viewing this topic.

SkillsXP

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Vertex Array crash at the release executable
« on: February 04, 2015, 03:26:37 pm »

for( int a = 0; a < 16; a++) {

pointmap.append(sf::Vertex(sf::Vector2f((a % 4) + horiz, (a / 4) + vert), sf::Color::Green));

}

 

If I start this code in c++, it works fine.
If I start the executable in the release folder, the loop works up to 2, so if a is equal to 2, the program crashs

Does someone know why this is happening?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Vertex Array crash at the release executable
« Reply #1 on: February 04, 2015, 03:34:55 pm »
Not because of this line of code, for sure. So please provide a complete and minimal code that reproduces the problem.

http://sscce.org/
Laurent Gomila - SFML developer

SkillsXP

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Vertex Array crash at the release executable
« Reply #2 on: February 04, 2015, 03:57:09 pm »
This is confusing. If I break the code at 2 it can start in the executable. Then everything works fine.

My debugger doesn't work too good at the moment, but he is telling me this:


1> pixelcreator.obj: error LNK2001: unresolved external symbol "" public: static class sf :: Color const sf :: Color :: Green "" (Green Color @ @ @ sf@@2V12 B?).
1> pixelcreator.obj: error LNK2001: unresolved external symbol "" public: static class sf :: Render States const sf :: Render States :: Default "" (Default Render States @ @ @ sf@@2V12 B?).

 

SkillsXP

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Vertex Array crash at the release executable
« Reply #3 on: February 04, 2015, 04:06:19 pm »
SOLVED! I can't explain concrete how I did that.

I switcht this code in the class definition up to the first of the code, after I have define the horizontal and the vertical integer.