|
From: <ara...@gm...> - 2021-11-16 15:59:01
|
Hi all, Thanks for taking the time to read this. I'm trying to build QuantLib-SWIG for Java under Windows. Instead of Visual Studio I'm using MSYS2 (which is based on Cygwin) for building. The make command compiles the target quantlib_wrap.o successfully but then fails at the target libQuantLibJNI.so with a ton of error messages like this one: C:/Users/christian/coding/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/1 1.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: quantlib_wrap.o:quantlib_wrap.:(.text$_ZN5boost10shared_ptrIN8QuantLib14Swap RateHelperEEC1IS2_EEPT_[_ZN5boost10shared_ptrIN8QuantLib14SwapRateHelperEEC1 IS2_EEPT_]+0x2f): undefined reference to `vtable for boost::detail::sp_counted_impl_p<QuantLib::SwapRateHelper>' The versions are: QuantLib 1.24 QuantLib-SWIG 1.24 Boost 1.77.0 (pre-compiled binaries) I ran the build of QuantLib-SWIG with the following commands and parameters: $ ./configure --with-jdk-include="/c/Users/christian/coding/jdk-15/include" --with-jdk-system-include="/c/Users/christian/coding/jdk-15/include/win32" $ make -C Java The failing build step is: g++ -g -O2 -shared quantlib_wrap.o -o libQuantLibJNI.so `quantlib-config --libs` The command quantlib-config --libs gives: -L/mingw64/lib -L/c/Users/christian/coding/boost_1_77_0/lib64-msvc-14.1 -lQuantLib The directory /mingw64/lib contains the previously compiled files libQuantLib.a and libQuantLib.la The build of QuantLib itself was successful. I ran it with the following commands and parameters: $ ./configure --enable-intraday --with-boost-lib=/c/Users/christian/coding/boost_1_77_0/lib64-msvc-14.1 --with-boost-include=/c/Users/christian/coding/boost_1_77_0 $ make $ make install Any help would be highly appreciated. Regards, Christian |