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

Author Topic: undefined refrences to  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

kirkm89

  • Newbie
  • *
  • Posts: 3
    • View Profile
undefined refrences to
« on: December 07, 2014, 10:58:23 am »
I am getting this error when running the code given to me on setup guide.

mingw32-g++.exe -DSMFL_STATIC -IC:\Users\Kirk\Desktop\SFML-2.1\include -c C:\Users\Kirk\Desktop\test.cpp -o C:\Users\Kirk\Desktop\test.o
mingw32-g++.exe -LC:\Users\Kirk\Desktop\SFML-2.1\lib -o C:\Users\Kirk\Desktop\test.exe C:\Users\Kirk\Desktop\test.o   -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x10e): undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x13e): undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x18c): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x1d6): undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x1f1): undefined reference to `_imp___ZN2sf5Color5GreenE'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x1fb): undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x223): undefined reference to `_imp___ZN2sf6Window5closeEv'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x245): undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x281): undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x29c): undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x2b9): undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x2cd): undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x2e9): undefined reference to `_imp___ZN2sf6Window7displayEv'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x2f8): undefined reference to `_imp___ZNK2sf6Window6isOpenEv'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x33a): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x39a): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text+0x430): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0xe): undefined reference to `_imp___ZTVN2sf11CircleShapeE'

C:\Users\Kirk\Desktop\test.o:test.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x1c): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
C:\Users\Kirk\Desktop\test.o:test.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x2c): undefined reference to `_imp___ZN2sf5ShapeD2Ev'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
20 error(s), 0 warning(s) (0 minute(s), 1 second(s))

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: undefined refrences to
« Reply #1 on: December 07, 2014, 11:48:13 am »
-DSMFL_STATIC

I don't any library that's called SMFL. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kirkm89

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: AW: undefined refrences to
« Reply #2 on: December 07, 2014, 08:07:27 pm »
-DSMFL_STATIC

I don't any library that's called SMFL. ;)
I don't know what you mean by that cause in linker I set it up EXACTLY like it told me to.

Strelok

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • GitHub
Re: Re: AW: undefined refrences to
« Reply #3 on: December 07, 2014, 08:21:53 pm »
-DSMFL_STATIC

I don't any library that's called SMFL. ;)
I don't know what you mean by that cause in linker I set it up EXACTLY like it told me to.
It's SFML_STATIC. You wrote SMFL