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

Author Topic: Undefined References  (Read 1649 times)

0 Members and 1 Guest are viewing this topic.

Robonics

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Undefined References
« on: June 16, 2020, 02:37:54 am »
I recently Included SFML to a new Project in VS code. My IDE lists no errors but my compiler keeps throwing these errors:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x5ce): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x5f2): undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x633): undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x887): undefined reference to `__imp__ZNK2sf6Window6isOpenEv'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x8a3): undefined reference to `__imp__ZN2sf6Window9pollEventERNS_5EventE'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x8be): undefined reference to `__imp__ZN2sf6Window5closeEv'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x8ec): undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x907): undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x917): undefined reference to `__imp__ZN2sf6Window7displayEv'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0x944): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\ezj21\AppData\Local\Temp\ccZt3gio.o:main.cpp:(.text+0xa2b): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status
I have consulted tons of help threads and out of desperation included all of the lib files and possible SFML dependencies I could think of in my compiler command line but I have had no luck so far and it keeps throwing the same errors. If anyone has any sort of idea of a possible fix please do not hesitate to throw it at me.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Undefined References
« Reply #1 on: June 16, 2020, 08:35:07 am »
What's your linker command look like?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything