the behavior mentioned only works with my build of ld viewtopic.php?f=6&t=27859srvaldez wrote:ok, suppose that you have FreeBasic installed in E:\dev\FreeBasic and there's a certain library that your program needs but that's not in the FB lib folder neither is the lib where the program source code is located
if you are compiling to 64-bit then if you have E:\mingw64\lib\your_lib.a then the linker will use that library, likewise for the 32-bit version you would need E:\mingw32\lib\your_lib.a
I don't know if this works for others but it works on my system, it's actually quite handy, say that you have several versions of FreeBasic and you have some common libraries that you may need, you could just have them in mingw64\lib and mingw32\lib and any of your FB versions will use those libraries automatically
I tried to determine the search path by trial & error, I found that if the lib is not in FB\lib that the FB installation path is not taken in consideration but the path of the source code that you are trying to compile
for example, suppose that you have your_program.bas in X:\dev\FBprograms\your_program.bas and FreeBasic is in C:\Users\your_name\Desktop\FreeBASIC-1.07.1-win64 and your_program links against a library that's not in the FB lib folder but the library is in X:\mingw64\lib then it will link against the library found in the mingw lib folder
I don't know if this behavior of ld is due to the more recent version or because how I built ld, I am inclined to think that it's due to the version