> In mingw terms, .lib is meant for dynamic linking, not static linking.
> the .a file is meant for static linking.

How can I get it to create a static windows lib?

Andrew

> -----Original Message-----
> From: hwloc-users-boun...@open-mpi.org [mailto:hwloc-users-
> boun...@open-mpi.org] On Behalf Of Samuel Thibault
> Sent: Thursday, January 12, 2012 3:36 PM
> To: Hardware locality user list
> Subject: Re: [hwloc-users] Compiling hwloc into a static library on
> Windows and Linux
> 
> Andrew Helwer, le Thu 12 Jan 2012 22:52:26 +0100, a écrit :
> > C:\hwloc-1.3.1\src>dolib.exe lib.exe X86 .libs/libhwloc.def libhwloc-
> > .libs/libhwloc.lib
> >
> > This creates a .lib file, but when I use the VS compiler to compile
> and link against it, it asks for a dll at runtime.
> 
> In mingw terms, .lib is meant for dynamic linking, not static linking.
> the .a file is meant for static linking.
> 
> > * VS does not know what __inline__ means
> 
> And Solaris does not know what __inline means... Ok, I have put
> compile-time #defines.
> 
> > * VS spouts out a whole bunch of errors relating to the definition of
> > __attribute__ and __deprecated__
> 
> Ah, damn, configure replaces our specially-crafted values... I have
> patched them.
> 
> > COMPILING HWLOC ON WINDOWS WITH VS
> >
> > VS apparently has problems when functions are declared as static
> inline when using its C compiler. A way around this I've found is to
> explicitly pass it the /TP flag, which makes it use its C++ compiler. A
> bunch of errors about the identifier '__attribute__' being a syntax
> error then pop up, however, and I haven't found a way around those yet.
> 
> These should go away with the next nightly snapshot.
> 
> Samuel
> _______________________________________________
> hwloc-users mailing list
> hwloc-us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users

Reply via email to