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

Author Topic: Can't run first sample  (Read 3004 times)

0 Members and 1 Guest are viewing this topic.

onEnterFrame

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't run first sample
« on: January 20, 2011, 09:46:53 am »
Code: [Select]


#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"

int main( int argc, char *argv ) {

sf::RenderWindow App(sf::VideoMode::GetMode(0), "SFML Shapes");
sf::RenderWindow app(sf::VideoMode::GetMode(0), "SFML Shapes", sf::Style::Fullscreen);

while ( true ) {
app.Display();
}

return 0;

} // End main()



program compiles then crashes: The application was unable to start correctly.

i have all the libraries, dlls in correct location, etc. i have tried both dynamic and static library linkages - the static linkage wont even compile.

ive tried both rendering windows and the regular window class.

im hearing a lot about ATI bugs but i have a NVIDIA graphics card, if it matters.


windows 7 64 bit. VC express 2010

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Can't run first sample
« Reply #1 on: January 20, 2011, 10:01:45 am »
Well, you have a while (true), which is always a bad start. It runs fine on my 32-bit windows 7 comp using Code::Blocks.

onEnterFrame

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't run first sample
« Reply #2 on: January 20, 2011, 10:02:52 am »
the while ( true ) is inconsequential and is just a placeholder til i can get the program to start at all.

it dies on window creation, renderwindow, or normal Window.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Can't run first sample
« Reply #3 on: January 20, 2011, 10:04:26 am »
Are you sure you have the 64-bit .dll files?

onEnterFrame

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't run first sample
« Reply #4 on: January 20, 2011, 10:09:50 am »
i was not aware they used separate dlls. things like OGRE etc always just used the one. i cant find them in my 1.6sdk install but since you say they exist ill search for those.

thank you.

onEnterFrame

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't run first sample
« Reply #5 on: January 20, 2011, 10:22:32 am »
where are the 64bit dlls for windows? do you have to compile them yourself?

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Can't run first sample
« Reply #6 on: January 20, 2011, 10:44:57 am »
Oh, I was thinking of the 64-bit dlls for SFML 2.0.

Actually, I'm not sure if there are different versions for 1.6. I think that the 1.6 SDK somes with 32-bit ones that work on 64-bit machines. I'm not sure.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Can't run first sample
« Reply #7 on: January 20, 2011, 11:48:50 am »
It works if you compile as 32 bits. But you have to recompile SFML for VC++ 2010, the 2008 precompiled files are not compatible.
Laurent Gomila - SFML developer

onEnterFrame

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't run first sample
« Reply #8 on: January 20, 2011, 09:48:41 pm »
yeah thanks. i finally found some old forum posts to the same effect, too.

i did look for answers before but sometimes its hard to sift through so many search results.

anyway i compiled last night and will test after work today. high expectations.