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 - Tafe_Warrior

Pages: [1]
1
General / Undefined refence to "_imp___ZN2s*****" on build
« on: August 26, 2024, 09:50:39 am »
I have been trying to get SFML to work for the last few hours.
https://en.sfml-dev.org/forums/index.php?topic=13304.0
https://en.sfml-dev.org/forums/index.php?topic=27427.0
These two posts had a similar issue but did not help resolve mine.
c++ code:
#include <SFML/Graphics.hpp>

int main() {
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
    return 0;
}
Build log:
C:\MinGW\bin\g++.exe -fdiagnostics-color=always -g "C:\Users\aleki\Documents\UQ\COSC3500 (High Performance Computing)\COSC3500-Flocking\visualiser.cpp" -o "C:\Users\aleki\Documents\UQ\COSC3500 (High Performance Computing)\COSC3500-Flocking\visualiser.exe" -I C:\SFML-2.6.1\include -L C:\SFML-2.6.1\lib -lsfml-graphics -lsfml-window -lsfml-system
C:\Users\aleki\AppData\Local\Temp\cckkE4nr.o: In function `main&#39;:
C:/Users/aleki/Documents/UQ/COSC3500 (High Performance Computing)/COSC3500-Flocking/visualiser.cpp:4: undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale&#39;
C:/Users/aleki/Documents/UQ/COSC3500 (High Performance Computing)/COSC3500-Flocking/visualiser.cpp:4: undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj&#39;
C:/Users/aleki/Documents/UQ/COSC3500 (High Performance Computing)/COSC3500-Flocking/visualiser.cpp:4: undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE&#39;
C:/Users/aleki/Documents/UQ/COSC3500 (High Performance Computing)/COSC3500-Flocking/visualiser.cpp:4: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev&#39;
collect2.exe: error: ld returned 1 exit status

Build finished with error(s).

I am using VSCode on Windows, with SFML version 2.6.1. I am completely new to using 3rd party c++ libraries so please be understanding. I have tried my best to link the right files but I know I could be at fault here.

Pages: [1]