SFML community forums

Help => General => Topic started by: onEnterFrame on January 20, 2011, 09:46:53 am

Title: Can't run first sample
Post by: onEnterFrame 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
Title: Can't run first sample
Post by: tntexplosivesltd 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.
Title: Can't run first sample
Post by: onEnterFrame 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.
Title: Can't run first sample
Post by: tntexplosivesltd on January 20, 2011, 10:04:26 am
Are you sure you have the 64-bit .dll files?
Title: Can't run first sample
Post by: onEnterFrame 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.
Title: Can't run first sample
Post by: onEnterFrame on January 20, 2011, 10:22:32 am
where are the 64bit dlls for windows? do you have to compile them yourself?
Title: Can't run first sample
Post by: tntexplosivesltd 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.
Title: Can't run first sample
Post by: Laurent 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.
Title: Can't run first sample
Post by: onEnterFrame 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.