On 15. 11. 2015 11:49, Baruch Burstein wrote:
> Hi,
> 
> I am trying to statically link bz2 so that I am not dependent on libbz2-1.dll 
> being in my path. I added the flag -lbz2 to the compilation, but it still 
> dependes on the dll! Am I doing something wrong?
> 
> $ ls /mingw64/lib/libb*
> /mingw64/lib/libbz2.a  /mingw64/lib/libbz2.dll.a
> 
> "-lbz2" should be taking the first, which in turn should not depend on the 
> dll, right?

Incorrect. The linker looks for both suffixes (and some others) automatically. 
Use `-static` (that's for `gcc`; use `-Bstatic` for direct `ld` invocations).

-- 
David Macek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to