Hi,
I have a problem with sfml while compiling.
I installed:
-VS Code
-VS Code Extension: C/C++
-g++, gpp and gdb
-msys
-SFML 2.6.1
A normal 'hello_world.cpp' compiles and runs fine, no errors, everything as expected.
But now I want to execute test code from sfml tutorial (code from
https://www.sfml-dev.org/tutorials/2.6/start-vc.php).
My MakeFile is this:
all: compile link
compile:
g++ -Isrc/include -c coding/*.cpp
link:
g++ *.o -o main -Lsrc\lib -lsfml-graphics-2 -lsfml-window-2 -lsfml-system-2 -lopenal32 -lsfml-audio-2
This is the terminal output/error:
g++ -Isrc/include -c coding/*.cpp
g++ *.o -o main -Lsrc\lib -lsfml-graphics-2 -lsfml-window-2 -lsfml-system-2 -lopenal32 -lsfml-audio-2
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics-2: No such file or directory
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window-2: No such file or directory
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system-2: No such file or directory
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible src\lib/libopenal32.a when searching for -lopenal32
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible src\lib\libopenal32.a when searching for -lopenal32
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible src\lib/libopenal32.a when searching for -lopenal32
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopenal32: No such file or directory
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible src\lib/libopenal32.a when searching for -lopenal32
D:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-audio-2: No such file or directory
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [MakeFile:7: link] Error 1
The main.o is created, but no .exe.
Pic of repo structure is in attachments.
I would be very thankful to any kind of help. I saw a lot of similar issues while googleing the problem, but not really any solution. Thanks!