Compile std::regex_iterator with gcc

后端 未结 1 1909
失恋的感觉
失恋的感觉 2021-01-11 17:18

I can create .o file with g++ -c test.cpp -std=c++0x, but cant link it, got next errors:

test.cpp:(.text+0xe5): undefined reference to `std::regex_i         


        
相关标签:
1条回答
  • 2021-01-11 17:56

    The GNU C++ standard library supports <regex>, but not until version 4.9.0. (The headers were present in earlier versions, but were unusable.)

    The other compilers don't support it, as far as I can see.

    You can use a different library if you use an older GCC.

    0 讨论(0)
提交回复
热议问题