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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SlowestLoris

Pages: [1]
1
General / Always running into "undefined reference to" errors
« on: September 07, 2019, 06:01:23 pm »
Details:
IDE: Visual Studio Code 2019
OS: Windows 10 (64-bit)
MinGW Builds 7.3.0 (64-bit)
SFML 2.5.1 (Visual C++ 15 2017 64-bit)

Terminal Output:
g++ -g -o main main.cpp -IC:/SFML-2.5.1/include -LC:/SFML-2.5.1/lib -lsfml-graphics -lsfml-window -lsfml-system <

C:\Users\zhang\AppData\Local\Temp\ccDcqIPC.o: In function `main':
C:\Development\Game1/main.cpp:7: undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:\Development\Game1/main.cpp:7: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:\Development\Game1/main.cpp:7: undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:\Development\Game1/main.cpp:8: undefined reference to `__imp__ZN2sf11CircleShapeC1Efy'
C:\Development\Game1/main.cpp:9: undefined reference to `__imp__ZN2sf5Color5GreenE'
C:\Development\Game1/main.cpp:9: undefined reference to `__imp__ZN2sf5Shape12setFillColorERKNS_5ColorE'
C:\Development\Game1/main.cpp:11: undefined reference to `__imp__ZNK2sf6Window6isOpenEv'
C:\Development\Game1/main.cpp:14: undefined reference to `__imp__ZN2sf6Window9pollEventERNS_5EventE'
C:\Development\Game1/main.cpp:17: undefined reference to `__imp__ZN2sf6Window5closeEv'
C:\Development\Game1/main.cpp:20: undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
C:\Development\Game1/main.cpp:20: undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:\Development\Game1/main.cpp:21: undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
C:\Development\Game1/main.cpp:21: undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:\Development\Game1/main.cpp:22: undefined reference to `__imp__ZN2sf6Window7displayEv'
C:\Development\Game1/main.cpp:7: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:\Development\Game1/main.cpp:7: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:\Users\zhang\AppData\Local\Temp\ccDcqIPC.o: In function `sf::CircleShape::~CircleShape()':
C:/SFML-2.5.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/SFML-2.5.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/SFML-2.5.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZN2sf5ShapeD2Ev'
collect2.exe: error: ld returned 1 exit status
The terminal process terminated with exit code: 1

I am using the tutorial's basic test code. Any help would be greatly appreciated!

Notes:
I have tried using other versions of Visual C++ under SFML 2.5.1 with no luck.

Pages: [1]
anything