SFML community forums

Help => General => Topic started by: GamDev on October 14, 2018, 01:54:04 am

Title: thor and SFML 2.5.0
Post by: GamDev on October 14, 2018, 01:54:04 am
Hi, I want to connect thor to sfml
but when compiling produces an error:
Quote
ld.exe||cannot find -lthor|
Why ?
Title: Re: thor and SFML 2.5.0
Post by: eXpl0it3r on October 14, 2018, 07:03:59 am
Does the Thor library file exist?
Title: Re: thor and SFML 2.5.0
Post by: GamDev on October 14, 2018, 09:04:12 am
Yes.
Title: Re: thor and SFML 2.5.0
Post by: GamDev on October 14, 2018, 09:10:59 am
I downloaded Precompiled binaries, including documentation and examples: "Windows, MinGW with g++"
Build log:
Quote
[100.0%] x86_64-w64-mingw32-g++.exe -L..\SFML-2.5.0\lib -L..\thor-v2.0-mingw\lib -o bin\Release\234.exe obj\Release\main.o  -s  -lsfml-graphics -lsfml-window -lsfml-system -lthor
C:/Users/Asus/Desktop/Test/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\thor-v2.0-mingw\lib/libthor.dll.a when searching for -lthor
C:/Users/Asus/Desktop/Test/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\thor-v2.0-mingw\lib/libthor.dll.a when searching for -lthor
C:/Users/Asus/Desktop/Test/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lthor
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Title: Re: thor and SFML 2.5.0
Post by: eXpl0it3r on October 14, 2018, 01:40:34 pm
The linker complains that it can't find it, as such either the path provided is wrong or the file doesn't exist at the specified place. Triple check that your relative path is correct.

Also not related, but will cause issues later on, you need to link Thor before SFML, as Thor depends on SFML (https://dev.my-gate.net/2018/01/10/rule-of-thumb-linking-order/).