ADD MXE REPOSITORY ============== (See https://mxe.cc/ for details) echo "deb https://pkg.mxe.cc/repos/apt focal main" | sudo tee /etc/apt/sources.list.d/mxeapt.list sudo apt-key add mxeapt.gpg # gotten from https://pkg.mxe.cc/repos/apt/client-conf/ sudo apt update INSTALL BUILT LIBRARIES ======================= sudo apt install mxe-x86-64-w64-mingw32.static-qt5 sudo apt install mxe-x86-64-w64-mingw32.static-gsl sudo apt install mxe-x86-64-w64-mingw32.static-matio sudo apt install mxe-x86-64-w64-mingw32.static-cfitsio Download and install my prebuilt packages: mxe-x86-64-w64-mingw32.static-libgetdata_0.10.0-focal-build-2021-03-12-tormod_amd64.deb mxe-x86-64-w64-mingw32.static-netcdf_4.7.4-focal-build-2021-03-12-tormod_amd64.deb mxe-x86-64-w64-mingw32.static-libnetcdf-cxx-legacy_4.2-focal-build-2021-03-12-tormod_amd64.deb BUILDING LIBRARIES NOT (YET?) IN MXE ==================================== (not needed if you download my prebuilt mxe-* packages instead!) # for building netcdf sudo apt install mxe-x86-64-w64-mingw32.static-curl # for building getdata sudo apt install mxe-x86-64-w64-mingw32.static-libltdl # Get and unpack the getdata-0.10.0 zip for Windows mkdir build && cd build && x86_64-w64-mingw32.static-cmake ../getdata-0.10.0/cmake # netcdf 4.7.4 mkdir build && cd build && x86_64-w64-mingw32.static-cmake ../netcdf-c-4.7.4 -D"BUILD_UTILITIES=OFF" -D"ENABLE_TESTS=OFF" # netcdf-cxx4 4.3.1 (not needed for kst) mkdir build && cd build && x86_64-w64-mingw32.static-cmake ../netcdf-cxx4-4.3.1 # and xx times add libraries link options missing from linklibs.rsp - something is broken # netcdf-cxx 4.2 (legacy) mkdir build-win && cd build-win && ../netcdf-cxx-4.2/configure --host=x86_64-w64-mingw32.static --prefix=/usr/lib/mxe/usr/x86_64-w64-mingw32.static BUILDING KST ============ # Generate makefiles and check all plugins are enabled (libraries found) x86_64-w64-mingw32.static-cmake ../../../kst-git -Dkst_qt5=/usr/lib/mxe -Dkst_cross=x86_64-w64-mingw32.static -Dkst_version_string=2.0.x-2021.03.13-18.12 -Dkst_release=1 -Dkst_merge_files=1 # moment of truth make VERBOSE=1 # something is wrong in cmake or xme wrapper: # dependent libraries not being added to the list of libraries in linklibs.rsp # add -hdf5 to matlab and hdf5 datasource linklibs.rsp sed -i 's/$/ -lhdf5/' src/datasources/CMakeFiles/kst2_datasource_hdf5.dir/linklibs.rsp # keep on going make VERBOSE=1 sed -i 's/$/ -lhdf5/' src/datasources/CMakeFiles/kst2_datasource_matlab.dir/linklibs.rsp make VERBOSE=1 # library object conflict zlib and cfitsio ... sed -i 's/$/ -Wl,--allow-multiple-definition/' src/datasources/CMakeFiles/kst2_datasource_fitsimage.dir/linklibs.rsp make VERBOSE=1 x86_64-w64-mingw32.static-pkg-config libcurl hdf5 --libs src/datasources/CMakeFiles/kst2_datasource_netcdf.dir/linklibs.rsp -lgslcblas src/plugins/CMakeFiles/kst2_fits_sinusoid_unweighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_polynomial_weighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_lorentzian_weighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_gaussian_unweighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_gaussian_weighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_exponential_weighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_sinusoid_weighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_exponential_unweighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_polynomial_unweighted.dir/linklibs.rsp src/plugins/CMakeFiles/kst2_fits_lorentzian_unweighted.dir/linklibs.rsp LINKS ===== https://mxe.cc/ https://github.com/zer0main/battleship/blob/master/build/windows/requirements.sh