Open MPI logo

Hardware Locality Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Users mailing list

Subject: Re: [hwloc-users] Compiling hwloc into a static library on Windows and Linux
From: Andrew Helwer (Andrew.Helwer_at_[hidden])
Date: 2012-01-12 18:13:10


> 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-bounces_at_[hidden] [mailto:hwloc-users-
> bounces_at_[hidden]] 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-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users