[Top][All Lists]

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

[Mingw-cross-env-list] Mingw-w64, libstdc++, libwinpthread and libgcc mi

From: Richard Crozier
Subject: [Mingw-cross-env-list] Mingw-w64, libstdc++, libwinpthread and libgcc missing dlls
Date: Sat, 01 Nov 2014 10:26:46 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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 add it to your list of projects if you like.


Attachment: mxe-conf.cmake
Description: Text Data

reply via email to

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