Hi Luis, All you need to do is turn on MITK_USE_Boost and add filesystem to the MITK_USE_Boost_LIBRARIES variable for MITK-build.
Rostislav. On 08/10/2015 17:30, Luis J. Salvatierra wrote: > Hi, > > I'm having a lot of trouble with this, mainly because I'm new to C++. > I'm trying to get the filename and extension from a string with this. > ''' > #include <boost/filesystem.hpp> > > namespace fs = boost::filesystem; > using boost::filesystem::path; > > path p = path(imagePath); > std::string filename = p.filename().string(); > std::string extension = p.stem().string(); > ''' > > I get this error: > ''' > LJSView.cpp:(.text+0xc304): undefined reference to > `boost::filesystem::path::filename() const' > LJSView.cpp:(.text+0xc33c): undefined reference to > `boost::filesystem::path::stem() const' > ''' > > I've tried adding the following to the plugin/project Superbuild.cmake > ''' > # ----------------- Boost ------------------------ > -DBOOST_ROOT:PATH=${BOOST_ROOT} > -DBOOST_LIBRARYDIR:PATH=${BOOST_LIBRARYDIR} > ''' > > I had to add too the following to the plugin/project CMakeLists.txt > ''' > mitk_create_plugin( > ... > PACKAGE_DEPENDS Boost > ... > ) > ''' > > But I can't get it to work. Any advice? Thanks :) > > Regards, ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users