c++ - Boost Linking Issues - Multiple Versions -
i writing c++ application has read binary .mat file. need use libmat , libmex (note not using mex files though). trying use boost::program_options
handle parsing command line arguments since non-gui application. using cmake handle build environment.
the version of boost working 1.59. however, when try link in program_options, cmake finding boost::program_options
library in matlab libraries , matlab libraries require boost 1.49. when try run compiled application, crashes because of using headers 1.59 libraries matlab's copies of 1.49. have ideas how can use 2 versions of boost since matlab not work 1.59 , matlab did not include include files 1.49.
if application crashes, means sadly 1.49 , 1.59 not binary compatible, way can work force application use 1.59. there might 2 options:
- force cmake use 1.59 libraries, setting
boost_librarydir
variant cmake. - force cmake use 1.59 libraries, , static versions of them, additionally setting
boost_use_static_libs
.
i don't use cmake, , findboost.cmake appears not up-to-date, i'm not 100% sure static option work, give try.
Comments
Post a Comment