Amar Vemanaboyina wrote:
> I am a new user of mingw. I am using MingW for Eclipse IDE.
> I have to include *.lib files to get my work done. I had referred
> many documents to link *.lib files through mingw. I couldn't find
> one. I came to know that there are ways to link *.dlls, but i
> couldn't find one for the purpose mentioned above, that is,
> linking of *.lib files.
> can any one help me out with this.
gcc ... -L/path/to/lib/file -lfoo ...
will find a library called `foo.dll', `libfoo.a' *or* `foo.lib', (and a
few others besides); the precise search order has been reported on this
list within recent months -- please search the archives.
Another (perhaps longer) way is to simply specify the full path name of
gcc ... /path/to/lib/file/foo.lib ...
As always, take care to specify source, object modules and libraries in
the proper order; libraries *must* be specified *after* the sources and
object modules which refer to them.