I made a Roguelike game with SFML in Microsoft Visual Studio 2010 and got it to compile fine in both configurations. However, when I run it in Debug mode in either, I get an error message.
Debug says:

This Application has failed to start because the Application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the Application may fix the problem (yea right :roll:).For more details, please see the application event log

That's with Debug on. Off, the thing just crashes.
Here's release:

Unhandled exception at 0x766c1ca4 in Simple Rogue.exe: 0xC0000005: Access violation reading location 0x00000002.
Break Continue Ignore

I am forced to break, and here's the odd line of code in some .c file causing problems:

if (__native_startup_state == __initializing)
                _initterm( __xc_a, __xc_z );//this one
                __native_startup_state = __initialized;

Also, I need to recompile every time I try to run in Debug Config for some reason... Any help would be greatly appreciated.

Recommended Answers

All 6 Replies

Did you compile the SFML libraries yourself from source or download one of the binaries? I went to their site and did not see a binary version that was built with vc++ 2010.

Downloaded Binaries then built it from the Build File, after converting it. Was there a better way to do this (or is this the completely wrong way?0

I downloaded the binaries for vc++ 2008 and got this simple tutorial to work with vc++ 2010 express. I had to copy the dlls into a directory that is in my PATH environment variable -- in my case I could have added the path but I chose to copy the dlls into c:\windows directory.

Post your program and I'll see if I can duplicate your problem.

I'm running 64-bit Windows 7 and can not successfully compile the example program pong.cpp because of unresolved external linkage for sf::Font::ourDefaultCharset. I've included every library in the package but no luck.

From what I read on their forums it appears the programs do not yet work with Windows 7.

[edit]Scrath that ^^^ it was my fault for not defining SFML_DYNAMIC

Whoops! didn't see that! It must be 64-Bit stuff, I'm on 64-Bit Vista with x86. I'm contacting my friend who uses Dev-C++ on Windows XP to see if he can compile it from the .cpp and .h files. Thanks for your help, anyway.

Got past that but now I'm having runtime problems because of missing DLLs such as openal32.dll and libsndfile-1.dll. I found out where to get openal32.dll but I have not yet discovered where to get libsndfile-1.dll.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.