Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to use boost on CodeBlocks. I have codeblocks configured with MinGW-w64. I alredy have included the following libraries in the linker settings

libboost_system-mgw73-mt-d-x32-1_66.a
libboost_system-mgw73-mt-x64-1_66.a
libboost_filesystem-mgw73-mt-x64-1_66.dll.a

I also try changing the order...

This is the source code

#include <iostream>
#include <boost/filesystem.hpp>

using namespace std;
namespace fs = boost::filesystem;
int main(int argc, char* argv[])
{
if( fs::is_directory("."))
    cout << "Works!" << endl;
return 0;
}

i have read many "solutions" but they didn't work. i tried:

  • changing the #include for this

    #define BOOST_NO_CXX11_SCOPED_ENUMS
    #include <boost/filesystem.hpp>
    #undef BOOST_NO_CXX11_SCOPED_ENUMS
    
  • creating a new compiler flag with boths values

-lboost_filesystem-mt

and also

-lboost_filesystem

but i always get the same error

...oost_1_66_0oostfilesystempath.hpp|981|undefined reference to `boost::filesystem::path::codecvt()'|
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
425 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...