Reputation:
I've begun using MinGW/MSYS in an attempt to use some Linux libraries on Windows. Using
./configure --prefix=/mingw
make
make install
has worked well so far, but I've had two different libraries fail on 'make install', on an 'ln -s' call. It goes something like this:
rm -f /mingw/lib/libvamp-sdk.so.2
ln -s libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2
ln: creating symbolic link `/mingw/lib/libvamp-sdk.so.2' to `libvamp-sdk.so.2.0.0': No such file or directory
make: *** [install] Error 1
First of all, what is the intention of the makefile? /mingw/lib/libvamp-sdk.so.2.0.0 exists, so replacing the above 'ln -s' call with
ln -s /mingw/lib/libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2
will work, but I'm not sure if this is what the author had intended.
More importantly, why does this occur (I'm guessing it works fine on native Linux systems) and what's the easiest way to get around it? I could manually edit the makefile but I'm wondering if there's a better solution to this.
Many thanks for your input!
Upvotes: 6
Views: 2868
Reputation: 76579
You misconfigured your build: *.so
files are for Linux, not Windows. You'll most likely need to add an option like --host=i686-pc-mingw32
to your configure invocation.
Upvotes: 3
Reputation: 36049
On linux systems, the unmodified
ln -s libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2
creates a relative symlink to make libvamp-sdk.so.2.0.0 available for programs which were linked to earlier or later instances of the library. However, this only makes sense when buildingfor .so-based systems.
For mingw builds, these lines are simply unnecessary because you build DLLs instead of shared libraries and the mechanism is different. These two lines can safely be deleted from the Makefile, just make sure the DLL and the libraries (libfoo.a and libfoo.dll.a) are installed, the former in /mingw/bin and the latter in /mingw/lib. You probably need to modify the Makefile for that.
Upvotes: 1