SFML community forums
Help => General => Topic started by: Jalfor on June 18, 2011, 01:41:06 pm
-
1>------ Build started: Project: SFML Test WORKING, Configuration: Debug Win32 ------
1>sfml-graphics-s-d.lib(Color.obj) : error LNK2005: "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll)
1>D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
That is the error I am getting when compiling a pre-written thing on shapes in the tutorial section. Thanks in advance.
-
You're linking to both the static and dynamic versions of sfml-graphics. This makes no sense, link to only one version.
-
1>------ Build started: Project: SFML Test WORKING, Configuration: Debug Win32 ------
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Yellow" (?Yellow@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Blue" (?Blue@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now this is the error I'm getting.
-
You must define SFML_DYNAMIC.
-
how do I do that?
-
It's explained in the tutorial.
-
Sorry for not realizing that even though it was in the tutorial. New error now.
'SFML Test WORKING.exe': Loaded 'D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe', Symbols loaded.
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'D:\programming\C++ projects\SFML Test WORKING\SFML Test WORKING\sfml-graphics-d.dll', Cannot find or open the PDB file
The program '[4924] SFML Test WORKING.exe: Native' has exited with code -1072365566 (0xc0150002).
-
Ok, now it's a runtime error (compiling and linking are ok), so you can run the debugger (F5) to know what's wrong ;)
By the way, in your next message you should give us more information about your system (OS, compiler, version of SFML, ...).
-
I've been running the debugger all along, what I posted above is the output. also, it comes up with a popup window saying
The application was unable to start correctly (0xc0150002). Click OK to close the application.
Also, I won't be able to post a response for a few hours as I am going to sleep now.
As always, thanks for the help.
-
This output is not from the debugger, this is the regular output.
The debugger:
- shows you where the crash happened in the source code
- shows you the call stack at the moment of the crash
- can show you much more information but these two things should be enough ;)
-
http://www.youtube.com/watch?v=4yVEYInhh50
That should give you some more information on what I'm doing.
-
I see. This kind of error popup often means that a DLL couldn't be found. You must make sure that the SFML DLLs are located in your working directory (which is defined in your project settings -- should be the project directory by default, but I recommend changing it to the executable directory).
-
http://www.youtube.com/watch?v=P8EB_9MNayY
It is probably easier for both you and me if I just show you things with YouTube videos as that is a lot easier than trying to explain it and you can see I'm not doing anything stupid.
-
Did you first recompile SFML? (VC2008 libs are not compatible with VC2010 -- half of the forum topics are about this)
-
oh, I thought that the converting thing fixed that. I'll do that now and get back to you with my result after I've done that.
-
What converting thing?
-
IT WORKED!!!
Thanks SO much for your help. I look forward to showing you what I make with SFML!