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

Author Topic: Just starting, problems already  (Read 1470 times)

0 Members and 1 Guest are viewing this topic.

bobingabout

  • Newbie
  • *
  • Posts: 47
    • View Profile
Just starting, problems already
« on: March 03, 2012, 07:27:43 pm »
I'm using MSVC++ 2008 with SFML1.6.
i'm basicly just reading through the tutorials here: http://www.sfml-dev.org/tutorials/1.6/ making my own little program that doesn't really do much. i get upto the sprite tutorial, and... i've hit a bump where there probably shouldn't be one.

    sf::Image Image;
    if (!Image.LoadFromFile("sprite.tga"))
        exit(EXIT_FAILURE);

The LoadFromFile function seems to cause a problem. to put it simply, comment out that line, and the exit line, and the program  runs fine, but if its there at all, the program crashs on window creation when you try and run it. it doesn't matter if the file exists or not, it always crashs.


There is also 3 warnings that come up when compiling.
sfml-window-s.lib(VideoMode.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
and same again for sfml-window-s.lib(Context.obj) and MSVCRT.lib(cpu_disp.obj)

Any ideas?

bobingabout

  • Newbie
  • *
  • Posts: 47
    • View Profile
Just starting, problems already
« Reply #1 on: March 03, 2012, 08:13:35 pm »
After further google-ing of the warnings, it turns out that the problem was with the fact that entry point seemed to have "main" written in it in the project settings, adding to the command line "/ENTRY:main", removing that fixed the problem.