Le 06/08/2016 à 02:26, Scott Kostyshak a écrit :
On Sat, Aug 06, 2016 at 02:01:00AM +0100, Guillaume Munch wrote:
Le 05/08/2016 à 02:35, Enrico Forestieri a écrit :
I am simply cross-compiling from cygwin following the usual way:
Good to know.
configure --host=i686-w64-mingw32 --build=i686-pc-cygwin ...
I would be happy to know how to do something similar from
Linux.
I'm not sure if this is relevant, but here is what I have done in the
past on Ubuntu:
# first need to install both of these packages:
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686
cd /path/to/lyx/git/repo/../
mkdir CMakeBuild
cd CMakeBuild
../repo/development/cmake/scripts/xmingw ../repo/
However, last time I tried this, I thought it was broken for
i686-w64-mingw32-g++ versions newer than 4.9.2. For more information,
see this thread:
https://www.mail-archive.com/search?l=mid&q=20160619175007.7bbnatvupidvnuoc%40klay
Turning the monolithic CMake flag to off in the script made it work for
me.
Thanks for the explanations. After a few tries and turning off the
MERGE_FILES flag, I got:
...master/src/frontends/qt4/GuiApplication.cpp:128:21: fatal error:
xcb/xcb.h: No such file or directory
and I do not know where to go from there.
But I managed to compile PreviewLoader.cpp by hand:
cd src/graphics && make PreviewLoader.{cpp.,}{i,s,obj}
without error.
For this to work, I had to select the posix variant because the win32
variant is the default:
sudo update-alternatives --set i686-w64-mingw32-gcc
/usr/bin/i686-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++
/usr/bin/i686-w64-mingw32-g++-posix
I can add that comment to the script if you agree.
For Enrico's suggestion of using the --target flag with autotools, the
problem is that I do not know where to find and install the windows
headers for the external libraries (which I think this script automatises).