"Ben Hutchings"
Scott Meyers
wrote: Try a slight variation:
cl /TP /W4 /WL /GX /GR -ID:\C++\Boost\Current simple_ls.cpp %BOOST_FILESYSTEM_LIB%
Alas, that doesn't help. I still get multiply defined symbols. This is with 1.30.2.
It looks like your program and the filesystem library are built against different versions of the C/C++ run-time library. Under the control of #pragma directives, Visual C++ compiler can insert references into object files that tell the linker which libraries to link with. In this case the linker tries to link with both run-time libraries and finds conflicting definitions. Check that you're linking with the right build of the filesystem library.
This just one of *many* reasons to take my advice and base your command-lines on those generated by building the tests in lib/filesystem/test with bjam. If the tests work, so will your project. I'm going to stop repeating myself now; take my advice or leave it. -- Dave Abrahams Boost Consulting www.boost-consulting.com