8

Cross compiling on Linux for Windows using MXE - GSL linking?

view full story
linux-howto

http://stackoverflow.com – I have a C++ project developed on Linux that I would like to pass to my Windows-user colleagues by giving them the executable file. I searched into the problem and found that one way could be to compile by using i586-mingw32msvc-g++ instead of g++. I also understood that this solution would trail the problem of linked libraries that need to be rebuilt, I hoped to solve this by using the MXE script (http://mxe.cc/). My makefile is (I'm new at this, suggestions are welcome): #main.make CC = i586-mingw32msvc-g++ CFLAGS = -Wall -O2 LDFLAGS = SOURCES = <list of cpp files> LDLIBS = -L/u (HowTos)