Oliver K
Oliver K

Reputation: 295

boost::filesystem3::path::codecvt() undefined reference

Trying to use boost filesystem 3, but when I link I get the following undefined reference:

../myfile-g.o: In function `boost::filesystem3::path::codecvt()':
../boost/filesystem/v3/path.hpp:377: undefined reference to
`boost::filesystem3::path::wchar_t_codecvt_facet()'

I grep'd everywhere in boost and there is no wchar_t_codecvt_facet()

Where is this defined?

Thanks

Upvotes: 1

Views: 7811

Answers (2)

diggy
diggy

Reputation: 351

Try adding -lboost_filesystem for the newer versions of boost library.

Upvotes: 2

GWW
GWW

Reputation: 44161

Perhaps you are missing a linked library? When I grep for it I get:

filesystem/v3/path.hpp:371  return *wchat_t_codecvt_facet();
filesystem/v3/path.hpp:462  static const codecvt_type *& wchar_t_codecvt_facet();

This is with boost 1.44 on macosx. Since the function is defined in the header file it should be part of libboost_filesystem . I'm not sure what compiler / linker you are using but the flag -libboost_filesystem will work if boost is properly on your path and you are using g++.

Upvotes: 4

Related Questions