Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Undefined reference ERROR Why?!?!?!!  (Read 1871 times)

0 Members and 1 Guest are viewing this topic.

Voyed

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Undefined reference ERROR Why?!?!?!!
« on: November 30, 2018, 09:26:00 am »
I keep getting this error when i wanna run a program in BuildLog:

-------------- Build: Debug in 3D Games (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -g -ID:\SFML-2.4.2\include -c "C:\Users\DELL\Desktop\CB Projects\3D Games\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe -LD:\SFML-2.4.2\lib -o "bin\Debug\3D Games.exe" obj\Debug\main.o   -lmingw32 -luser32 -lgdi32 -lwinmm -ldxguid -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
obj\Debug\main.o: In function `main':
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:6: undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:6: undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:6: undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:9: undefined reference to `_imp___ZN2sf7TextureC1Ev'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:10: undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:12: undefined reference to `_imp___ZN2sf6SpriteC1ERKNS_7TextureE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:15: undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:19: undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:23: undefined reference to `_imp___ZN2sf6Window5closeEv'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:27: undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:27: undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:30: undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:30: undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:33: undefined reference to `_imp___ZN2sf6Window7displayEv'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:9: undefined reference to `_imp___ZN2sf7TextureD1Ev'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:6: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:9: undefined reference to `_imp___ZN2sf7TextureD1Ev'
C:/Users/DELL/Desktop/CB Projects/3D Games/main.cpp:6: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
obj\Debug\main.o: In function `ZN2sf8DrawableD2Ev':
D:/SFML-2.4.2/include/SFML/Graphics/Drawable.hpp:52: undefined reference to `_imp___ZTVN2sf8DrawableE'
obj\Debug\main.o: In function `ZN2sf6SpriteD1Ev':
D:/SFML-2.4.2/include/SFML/Graphics/Sprite.hpp:47: undefined reference to `_imp___ZTVN2sf6SpriteE'
D:/SFML-2.4.2/include/SFML/Graphics/Sprite.hpp:47: undefined reference to `_imp___ZTVN2sf6SpriteE'
D:/SFML-2.4.2/include/SFML/Graphics/Sprite.hpp:47: undefined reference to `_imp___ZN2sf13TransformableD2Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
23 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 

S_BISHOP

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Re: Undefined reference ERROR Why?!?!?!!
« Reply #1 on: January 03, 2019, 09:44:44 am »
Hey mate, i have been through hell and back with this. its not clear and quite the pitfall.

when dowloading code bocks dowload the TDM install not the MING one, MING is apparently in-compatable with code blocks, because its windows specific, give it a go, i think it will work.