1
General / Re: Problem linking SFML: fatal error: stdlib.h: No such file or directory
« on: April 27, 2020, 05:46:12 pm »
The fault was really on my side here. Thanks to Laurent for pointing that out. I had two paths on the include-paths-environment-variable messed up and in the wrong order. Now I get the following errors:
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x9): undefined reference to `__imp__ZTVN2sf4TextE'
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x10): undefined reference to `__imp__ZTVN2sf11VertexArrayE'
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x8d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x9): undefined reference to `__imp__ZTVN2sf4TextE'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x10): undefined reference to `__imp__ZTVN2sf11VertexArrayE'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x8d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x65): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
bin/main.o:main.cpp:(.text.startup+0x96): undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
bin/main.o:main.cpp:(.text.startup+0xda): undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
bin/main.o:main.cpp:(.text.startup+0x109): undefined reference to `__imp__ZN2sf7TextureC1Ev'
bin/main.o:main.cpp:(.text.startup+0x133): undefined reference to `__imp__ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
bin/main.o:main.cpp:(.text.startup+0x15e): undefined reference to `__imp__ZN2sf7TextureD1Ev'
bin/main.o:main.cpp:(.text.startup+0x167): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
bin/main.o:main.cpp:(.text.startup+0x192): undefined reference to `__imp__ZN2sf6SpriteC1ERKNS_7TextureE'
bin/main.o:main.cpp:(.text.startup+0x19b): undefined reference to `__imp__ZN2sf4FontC1Ev'
bin/main.o:main.cpp:(.text.startup+0x1b6): undefined reference to `__imp__ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
bin/main.o:main.cpp:(.text.startup+0x213): undefined reference to `__imp__ZN2sf4TextC1ERKNS_6StringERKNS_4FontEj'
bin/main.o:main.cpp:(.text.startup+0x242): undefined reference to `__imp__ZN2sf5MusicC1Ev'
bin/main.o:main.cpp:(.text.startup+0x25d): undefined reference to `__imp__ZN2sf5Music12openFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
bin/main.o:main.cpp:(.text.startup+0x288): undefined reference to `__imp__ZN2sf5MusicD1Ev'
bin/main.o:main.cpp:(.text.startup+0x297): undefined reference to `__imp__ZTVN2sf6SpriteE'
bin/main.o:main.cpp:(.text.startup+0x2b6): undefined reference to `__imp__ZN2sf4FontD1Ev'
bin/main.o:main.cpp:(.text.startup+0x2c9): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x2d9): undefined reference to `__imp__ZN2sf11SoundStream4playEv'
bin/main.o:main.cpp:(.text.startup+0x2e0): undefined reference to `__imp__ZN2sf6Window9pollEventERNS_5EventE'
bin/main.o:main.cpp:(.text.startup+0x2e9): undefined reference to `__imp__ZNK2sf6Window6isOpenEv'
bin/main.o:main.cpp:(.text.startup+0x32e): undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
bin/main.o:main.cpp:(.text.startup+0x33b): undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
bin/main.o:main.cpp:(.text.startup+0x342): undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
bin/main.o:main.cpp:(.text.startup+0x350): undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
bin/main.o:main.cpp:(.text.startup+0x373): undefined reference to `__imp__ZN2sf6Window7displayEv'
bin/main.o:main.cpp:(.text.startup+0x385): undefined reference to `__imp__ZN2sf6Window5closeEv'
bin/main.o:main.cpp:(.text.startup+0x3e4): undefined reference to `__imp__ZTVN2sf6SpriteE'
bin/main.o:main.cpp:(.text.startup+0x40d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x416): undefined reference to `__imp__ZN2sf7TextureD1Ev'
bin/main.o:main.cpp:(.text.startup+0x41f): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
bin/main.o:main.cpp:(.text.startup+0x433): undefined reference to `__imp__ZN2sf4FontD1Ev'
bin/main.o:main.cpp:(.text.startup+0x45a): undefined reference to `__imp__ZN2sf5MusicD1Ev'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:15: sfmltest.exe] Error 1
I guess it is because I use a newer GCC so I will try to build SFML myself.
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x9): undefined reference to `__imp__ZTVN2sf4TextE'
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x10): undefined reference to `__imp__ZTVN2sf11VertexArrayE'
bin/main.o:main.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x8d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x9): undefined reference to `__imp__ZTVN2sf4TextE'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x10): undefined reference to `__imp__ZTVN2sf11VertexArrayE'
bin/main.o:main.cpp:(.text$_ZThn8_N2sf4TextD1Ev[_ZThn8_N2sf4TextD1Ev]+0x8d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x65): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
bin/main.o:main.cpp:(.text.startup+0x96): undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
bin/main.o:main.cpp:(.text.startup+0xda): undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
bin/main.o:main.cpp:(.text.startup+0x109): undefined reference to `__imp__ZN2sf7TextureC1Ev'
bin/main.o:main.cpp:(.text.startup+0x133): undefined reference to `__imp__ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
bin/main.o:main.cpp:(.text.startup+0x15e): undefined reference to `__imp__ZN2sf7TextureD1Ev'
bin/main.o:main.cpp:(.text.startup+0x167): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
bin/main.o:main.cpp:(.text.startup+0x192): undefined reference to `__imp__ZN2sf6SpriteC1ERKNS_7TextureE'
bin/main.o:main.cpp:(.text.startup+0x19b): undefined reference to `__imp__ZN2sf4FontC1Ev'
bin/main.o:main.cpp:(.text.startup+0x1b6): undefined reference to `__imp__ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
bin/main.o:main.cpp:(.text.startup+0x213): undefined reference to `__imp__ZN2sf4TextC1ERKNS_6StringERKNS_4FontEj'
bin/main.o:main.cpp:(.text.startup+0x242): undefined reference to `__imp__ZN2sf5MusicC1Ev'
bin/main.o:main.cpp:(.text.startup+0x25d): undefined reference to `__imp__ZN2sf5Music12openFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
bin/main.o:main.cpp:(.text.startup+0x288): undefined reference to `__imp__ZN2sf5MusicD1Ev'
bin/main.o:main.cpp:(.text.startup+0x297): undefined reference to `__imp__ZTVN2sf6SpriteE'
bin/main.o:main.cpp:(.text.startup+0x2b6): undefined reference to `__imp__ZN2sf4FontD1Ev'
bin/main.o:main.cpp:(.text.startup+0x2c9): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x2d9): undefined reference to `__imp__ZN2sf11SoundStream4playEv'
bin/main.o:main.cpp:(.text.startup+0x2e0): undefined reference to `__imp__ZN2sf6Window9pollEventERNS_5EventE'
bin/main.o:main.cpp:(.text.startup+0x2e9): undefined reference to `__imp__ZNK2sf6Window6isOpenEv'
bin/main.o:main.cpp:(.text.startup+0x32e): undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
bin/main.o:main.cpp:(.text.startup+0x33b): undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
bin/main.o:main.cpp:(.text.startup+0x342): undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
bin/main.o:main.cpp:(.text.startup+0x350): undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
bin/main.o:main.cpp:(.text.startup+0x373): undefined reference to `__imp__ZN2sf6Window7displayEv'
bin/main.o:main.cpp:(.text.startup+0x385): undefined reference to `__imp__ZN2sf6Window5closeEv'
bin/main.o:main.cpp:(.text.startup+0x3e4): undefined reference to `__imp__ZTVN2sf6SpriteE'
bin/main.o:main.cpp:(.text.startup+0x40d): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
bin/main.o:main.cpp:(.text.startup+0x416): undefined reference to `__imp__ZN2sf7TextureD1Ev'
bin/main.o:main.cpp:(.text.startup+0x41f): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
bin/main.o:main.cpp:(.text.startup+0x433): undefined reference to `__imp__ZN2sf4FontD1Ev'
bin/main.o:main.cpp:(.text.startup+0x45a): undefined reference to `__imp__ZN2sf5MusicD1Ev'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:15: sfmltest.exe] Error 1
I guess it is because I use a newer GCC so I will try to build SFML myself.