SFML community forums
Help => Graphics => Topic started by: Gio on June 03, 2010, 12:40:56 am
-
I am trying to write a simple program where you move a square around the screen. However, i got the following error when I tried to build it:
1>------ Build started: Project: Move the Square!!!, Configuration: Debug Win32 ------
1> Move the Square!!!.cpp
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Move the Square!!!.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>C:\Users\Gio\Desktop\Documents\C++ Programs\2D & 3D Games\Move the Square!!!\Debug\Move the Square!!!.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
How can i fix this? I will give the code if needed.
-
I have no clue about MSVS but are you using the correct version of MSVS that your SFML library has been compiled for? Just a wild guess.
-
Read the "Getting started - Visual C++" tutorial, and stop when you see "SFML_DYNAMIC" ;)
-
Well, I got it to compile now :) . But now, it crashes when I try to run it. I put the .dll's in the folder (system, graphics and window) and it still crashed. So I replaced the linking with the -d versions of the .dll's and also replaced the .dll's. It now won't even start. How do I fix this? :oops:
-
Do you have an error message after the crash? Have you tried using the debugger?
-
It gives an error when I run w/ debugging:
This Application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.
Where is the event log?
-
Anyone? I still can't fix it. :oops:
-
If you got it to compile and you put the dlls in the folder with the exe you should be able to double click the exe and run it. If not it's something with the code/driver.
I would start with the basic tests/tuts before writing code. That can also help you find which dll you are missing by what you include or not and whether it compiles/crashes when you run the exe.
This will also help you figure out whether it's the IDE setup or something else.
I can't really give you better advice because I don't use VS.