On Sun, 18 Apr 2010 10:52:26 Sisyphus wrote:
> Hi,
> 
> I asked about this on 14 Oct last year
> (http://sourceforge.net/mailarchive/forum.php?thread_name=A00A469F7EBE44199
> 92A92CBC29D03F5%40desktop2&forum_name=mingw-w64-public) and didn't get any
> replies - so I thought I'd ask again and see what information I can glean
> this time.
> 
> With mingw32 (from mingw.org), I have built and installed a number of
> libraries (eg gmp) in C:\_32\msys\1.0\local\lib.
> Because I have set the LIBRARY_PATH environment variable to
> 'C:\_32\msys\1.0\local\lib', I can link to those libraries without having
> to use the -L switch. That is, I can build gmp apps by running:
> 
> gcc -o gmp_app.exe gmp_app.c -lgmp
> 
> With mingw64, the corresponding libs are in C:\_64\msys\1.0\local\lib and,
> again, I've set the LIBRARY_PATH environment variable to that directory.
> But the same command can't find the gmp library, and therefore fails.
> Instead, I have to run
> 
> gcc -o gmp_app.exe gmp_app.c -LC:\_64\msys\1.0\local\lib -lgmp
> 
> With mingw64, is there currently some way I can avoid having to use the -L
> switch in relation to libraries in that location ?
> If not, are there any plans to introduce such a feature ?
> 

This is an environment/gcc thing, and not a mingw64 thing.  gcc searches the 
paths in a specific order (pass the -v command line option to see what it is).

I don't know how gcc reacts to LIBRARY_PATH.   I don't use it. IMHO, 
LIBRARY_PATH is a bad thing, as you can end up picking up the wrong things.   
I think it's always better to be able to see what's going on :)

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to