mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] mxe with sfml linking errors


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] mxe with sfml linking errors
Date: Sun, 18 Aug 2013 13:29:12 +1000

On 17/08/2013, at 5:57 PM, damien LAURENT <address@hidden> wrote:

> Dear list,
> 
> I've developped a project on linux and I now I would like to distribute
> it on Windows. My project uses the following external libraries: fftw,
> SFML and wxWidgets.
> With the command 
> $
> cmake 
> ..-DCMAKE_TOOLCHAIN_FILE=/home/damien/mxe/usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake
> then
> $ make
> the compilation occurs nicely, but it makes errors when linking.
> The error messages seems to refer to SFML objects (e.g. first line
> sf::Color::Black). Here are the messages:
> address@hidden:~/Bureau/cpp/winviolette/build$ make
> Linking CXX executable violette.exe
> CMakeFiles/violette.dir/src/Controller.cpp.obj:Controller.cpp:(.text
> +0xd86): undefined reference to `_imp___ZN2sf5Color5BlackE'

I suspect it's missing a CFLAG of "-DSFML_STATIC". I've added a pkg-config file 
for sfml and changed the test program to use it:

https://github.com/mxe/mxe/commit/63186734c28f2a24ab3f4934a1a04089dc785065

You can use the test program as an example of how to link correctly, though I'm 
not sure how you pass this into cmake.

Cheers,

Tony




reply via email to

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