SFML community forums
Help => General => Topic started by: falcon on September 12, 2015, 07:13:44 pm
-
I worked my way through the http://www.sfml-dev.org/tutorials/2.3/start-cb.php (http://www.sfml-dev.org/tutorials/2.3/start-cb.php) for installing SFML and tried running the sample code. I get a boat load of errors here:
||=== Build: Debug in DemoSFML (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\Code\DemoSFML\main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Code\DemoSFML\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Code\DemoSFML\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Code\DemoSFML\main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\Code\DemoSFML\main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
C:\Code\DemoSFML\main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Code\DemoSFML\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Code\DemoSFML\main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Code\DemoSFML\main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
C:\Code\DemoSFML\main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Code\DemoSFML\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
C:\Code\DemoSFML\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Code\DemoSFML\main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\Code\DemoSFML\main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Code\DemoSFML\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Code\DemoSFML\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Code\DemoSFML\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
D:\SFML-2.3.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
D:\SFML-2.3.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
D:\SFML-2.3.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
-
The details matter, it's not enough to just look at images. ;)
If you link statically you have to define SFML_STATIC.
If you do not link statically you should not define SFML_STATIC.
-
I have no idea what that means
-
Preprocesssor definitions. There should be a section somewhere where you can predefine preprocessor things. In Visual Studio its Project Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions. I have no idea where it is in Code::Blocks.
-
Okay, thanks gambit. I found it, added SFML_STATIC to it and at least I got a console to pop up but I get new errors.
-------------- Build: Debug in DemoSFML (compiler: GNU GCC Compiler)---------------
Target is up to date.
Nothing to be done (all items are up-to-date).
-------------- Run: Debug in DemoSFML (compiler: GNU GCC Compiler)---------------
Checking for existence: C:\Code\DemoSFML\bin\Debug\DemoSFML.exe
Executing: "C:\Program Files (x86)\CodeBlocks/cb_console_runner.exe" "C:\Code\DemoSFML\bin\Debug\DemoSFML.exe" (in C:\Code\DemoSFML\.)
Process terminated with status -1073741510 (0 minute(s), 13 second(s))
-
It means you got a runtime error (aka crash). Do you get any other errors popping up. ;)
-
There is a popup error but it just says: The application was unable to start correctly (0xc000007b). Click OK to close the application.
-
Probably you are missing some of the dlll's.
-
Probably you are missing some of the dlll's.
No.
The application was unable to start correctly (0xc000007b).
You know, if you had just googled the error, you've found a ton of answers already.
IIRC it usually has something to do with mixing x64 and x86 libraries.
-
The application was unable to start correctly (0xc000007b).
You know, if you had just googled the error, you've found a ton of answers already.
IIRC it usually has something to do with mixing x64 and x86 libraries.
[/quote]
If you don't have anything useful to say, leave. Go troll some other thread, I don't need you here.
-
Actually if you'd listen to what eXpl0it3r had said, you could well have an answer. http://lmgtfy.com/?q=c%2B%2B+0xc000007b+error From googling it, it appears you have the wrong version of the dlls. That error is usually called by the presence of incorrect dlls (64 bit rather than 32) or wrong libraries (again different versions that the linker doesn't pick up on), rather than the lack of dlls.