[mlpack] compiling mlpack with MinGW/MSYS
Gilles Barges
gbarges at free.fr
Sun Aug 10 02:09:40 EDT 2014
Finally, I achieved mlpack build … till 99 %
The last target, mlpack_test, fails with 4 errors ( /C/Users/gbg/Desktop/msys/1.0/ is the same as /usr ) :
cd /C/Users/gbg/Desktop/Librairies/mlpack-1.0.9/build-w64/src/mlpack/tests && /c/TDM-GCC-64/bin/g++.exe -O3 -Wl,--whole-archive CMakeFiles/mlpack_test.dir/objects.a -Wl,--no-whole-archive -o ../../../mlpack_test.exe -Wl,--out-implib,../../../libmlpack_test.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -L/C/Users/gbg/Desktop/msys/1.0/local/lib ../../../libmlpack.a /C/Users/gbg/Desktop/msys/1.0/bin/libarmadillo.dll /C/Users/gbg/Desktop/msys/1.0/local/bin/libopenblas.dll /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_program_options-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_unit_test_framework-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_random-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/bin/libxml2-2.dll -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
../../../libmlpack.a(lrsdp_function.cpp.obj):lrsdp_function.cpp:(.text+0x6e0): multiple definition of `mlpack::optimization::AugLagrangianFunction<mlpack::optimization::LRSDPFunction>::Evaluate(arma::Mat<double> const&) const'
../../../libmlpack.a(lrsdp.cpp.obj):lrsdp.cpp:(.text$_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8EvaluateERKN4arma3MatIdEE[_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8EvaluateERKN4arma3MatIdEE]+0x0): first defined here
../../../libmlpack.a(lrsdp_function.cpp.obj):lrsdp_function.cpp:(.text+0xf00): multiple definition of `mlpack::optimization::AugLagrangianFunction<mlpack::optimization::LRSDPFunction>::Gradient(arma::Mat<double> const&, arma::Mat<double>&) const'
../../../libmlpack.a(lrsdp.cpp.obj):lrsdp.cpp:(.text$_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8GradientERKN4arma3MatIdEERS6_[_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8GradientERKN4arma3MatIdEERS6_]+0x0): first defined here
CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj):mlpack_test.cpp:(.text+0x3): undefined reference to `__imp__ZTVN5boost9unit_test13test_observerE'
CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj):mlpack_test.cpp:(.text+0xc1): undefined reference to `__imp__ZN5boost9unit_test9framework17master_test_suiteEv'
c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj): bad reloc address 0x0 in section `.pdata$_ZN5boost9unit_test13test_observer10test_startEm'
Other generated exes seem to work.
Although I don't need mlpack_test.exe, I could not install with 'make install'.
So I installed manually.
And I could compile, link and execute my app.
Thanks for your help.
Gilles.
--
Gilles Barges.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20140810/7d2dafad/attachment.html>
More information about the mlpack
mailing list