[Top][All Lists]

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

Re: [Mingw-cross-env-list] Mingw-w64, libstdc++, libwinpthread and libgc

From: Rashad M
Subject: Re: [Mingw-cross-env-list] Mingw-w64, libstdc++, libwinpthread and libgcc missing dlls
Date: Sat, 1 Nov 2014 22:36:17 +0530

Hi Richard,

On Sat, Nov 1, 2014 at 3:56 PM, Richard Crozier <address@hidden> wrote:
Dear List,

First of all thanks for your work on MXE, secondly, I'm not a subscriber, so please CC me on any replies.

I have a cmake based project which I am cross-compiling on 64 bit Linux for 64 bit windows using Mingw-w64 via MXE. The project creates static libraries, and also some executebles which are this wrappers for the static libraries.

When I attempt to load the static libraries I have problems due to missing dlls (e.g. libstdc++, libwinpthread and libgcc). These dlls seem to be shipped with Mingw-w64, and can be found if Mingw-w64 is installed on the User's system, but I would like to avoid Users having to do this. What is the best/standard way to get around this? I'm using the standard cmake toolchain file (attached) provided by MXE (which looks like it's supposed to be statically linking everything anyway).

I have tried the following cmake command to try and have the libraries linked statically, but it didn't seem to have any effect on the resulting binary sizes:

cmake -DCMAKE_BUILD_TYPE=Release \
      "-static -static-libgcc -static-libstdc++"" \

-DCMAKE_TOOLCHAIN_FILE=/opt/mxe/usr/x86_64-w64-mingw32/share/cmake/mxe-conf.cmake $WORKING_COPY_DIR/release/xfemm_mingw_win64/cfemm

Alternatively, can I have MXE build these libraries and copy them to the distribution? If so, how?

In case you are interested, the project (xfemm) is freely available on Sourceforge here:

You can create a package in mxe. It is very easy. - http://mxe.cc/#creating-packages 


You can add it to your list of projects if you like.

clone mxe from github and issue a pull request so that it can be merged.




reply via email to

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