Compilación de software Linux en Windows 64

Install mingw 64 sjlj en c:/mingw
mingw-get autoconf msys-libregex
#export MINGW_PATH=C:/mingw
#export MING_PATHS=/include
(although scons seems to not detect it)

Install msys+7za+wget…. 64 bit en c:/msys
Install java64 en c:java

From msys.bat run the commands

Install git for windows

Clone xmipp repository

Run xmipp/install.sh

Install windows version of python 2.7?

Source xmipp/.xmipp.bashrc

BUILD
./setup.py compile
which in turn calls
xmipp_python external scons/scons.py
You can pass options to scons directly, like
xmipp_python external scons/scons.py gtest=false CXXFLAGS=-mwindows quiet=false mode=compile
(-mwindows might help with the crtdbg bug, but what fixed in Condor is just commenting the include…)
Use CXXFLAGS=/include (since inside Ming, include is in /include), JNI_CPPATH=/c/Program Files/java/jdk…

scons build process may fail, in which case hand-compilation is not that hard:

# compile
x86_64_w64_mingw32-g++ -D__MINGW__ -fpermissive -D_JNI_IMPLEMENTATION -c file.cpp
Includes: -I/include -I/c/java…../include
# link
x86_64_w64_mingw32-g++ -llibxyz -shared *.o -o libxxx.dll
# binary – use above parameters (-D, -I, -L…) as needed
x86_64_w64_mingw32-g++file.cpp -o file.exe

In Java, libraries are looked for in %PATH%

Take into account that POSIX support in Windows is tiny (unless you install the Interix module available in the Ultimate and Server editions). Specifically, memory mapping and file locking should be done with the native Windows API
Open binary files with fopen “b” (even though POSIX does not require it, windows needs it)
In Mingw, paths are c:/dir1/file2.txt

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *