[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] GSL library built with MXE cannot be linked under

From: Peter Dedecker
Subject: [Mingw-cross-env-list] GSL library built with MXE cannot be linked under Visual Studio 2010
Date: Fri, 29 Jun 2012 10:27:52 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Dear MXE folks,

for the past year or so I've had success using MXE to build a number of static
libraries for use on Windows. In particular, I use MXE to build the GSL, FFTW,
and libtiff, which I then link in using the Visual Studio compiler and linker.
My code is cross-platform and runs on Mac, Windows, and Linux; the only problem
is getting binaries for these libraries on windows.

For example, to use the GSL I do the following:
1) in MXE: 'make gsl'
2) copy the libgsl.a file to the windows computer.
3) Add the resulting .a file as a dependency in the Visual Studio project, and
include the headers.
4) Adding libmingwex.a and libgcc.a is also required.
5) Compile my project.

This seems to work fine and has proven a great help, since I find it difficult
to find Windows versions of these libraries (particularly static ones). 

I have recently 'upgraded' to Visual Studio 2010 from Visual Studio 2008.
Unfortunately, linking the gsl no longer works due to a missing symbol
("_hypot"). The problem is described in
It appears as blame is entirely on Microsoft for this.

The solution mentioned in that link is to directly edit the math.h header to
make the hypot function no longer inline. However, that solution is untenable
since others are expected to build my code as well, and I cannot ask them to
edit the SDK files.

Do any of you see a solution to this issue? For example, is there a way to build
the gsl such that it will not have any external dependencies at all?
Unfortunately, going back to Visual Studio 2008 is not realistic since I cannot
require other users to only use this going forward.

Thanks for providing this great tool!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]