steps for cross-compiling the win32-executable (on ubuntu-9.10 running in VirtualBox)
Added by Frank Kaspar about 15 years ago
Hi Ralf,
thanks for the excellent work concerning the cross-compilation of CDO for Windows-Platforms.
I was also able to build the Win32-version of CDO on our hardware. Attached I describe everything I did. Perhaps this can be helpful for others:
As suggested I used an ubuntu-9.10 in a virtual-box.
These packages can be found here:- The “VirtualBox”-virtualizer: http://www.virtualbox.org/
- The VirtualBox-Ubuntu-9.10-Image:
(overview: http://virtualboxes.org/images/ubuntu/ )
Before starting the cross-compilation in this environment, it is necessary to install two additional packages:(direct download link: http://downloads.sourceforge.net/virtualboximage/ubuntu-9.10.vdi.7z )
sudo apt-get install mingw32
sudo apt-get install wine
mingw32 is the cross-compiler package itself;
wine is used to execute some tests during the “configure”-step of the hdf5-library.
The following steps are based on the packages “libs4cdo-0.0.5.tar.gz” and “cdo-1.4.3.tar.gz“ as provided on the CDO-homepage.
mkdir =/home/ubuntu/cdo_win
export WORK_DIR=/home/ubuntu/cdo_win
cd $WORK_DIR
tar xzvf libs4cdo-0.0.5.tar.gz
cd libs4cdo-0.0.5
make win32libs4cdo PREFIX=$WORK_DIR
cd ..
tar xzvf cdo-1.4.3.tar.gz
cd cdo-1.4.3
./configure --host=i586-mingw32msvc --prefix=$WORK_DIR --with-netcdf=$WORK_DIR --with-proj=$WORK_DIR --with-zlib=$WORK_DIR --with-szlib=$WORK_DIR --with-hdf5=$WORK_DIR --with-threads=$WORK_DIR
make
make install
The cdo-executable will then be available in $WORK_DIR/bin
Best regards,
Frank Kaspar (CM-SAF, DWD)
Replies (1)
RE: steps for cross-compiling the win32-executable (slight correction) - Added by Frank Kaspar about 15 years ago
I applied the correction to the original post. Please ignore this comment.
Frank Kaspar wrote:
> ./configure --host=i586-mingw32msvc --prefix=$WORK_DIR --with-netcdf=$WORK_DIR --with-proj=$WORK_DIR --with-zlib=$WORK_DIR --with-zlib=$WORK_DIR --with-hdf5=$WORK_DIR --with-threads=$WORK_DIR
I just realized that there is a typo in this line (one instance of "--with-zlib" should be replaced with "--with-szlib").
Frank