hello all
hello all

Reputation: 252

Code::Blocks 13.12 on Windows not recognizing std::codecvt even with -std=c++11

I'm compiling an openFrameworks project with ofxTrueTypeFont on Code::Blocks 13.12 on Windows 8.1, with mingw32-g++ version 4.8.1.

It ends up with an error:

...\ofxTrueTypeFontUC.cpp | fatal error: codecvt: No such file or directory

I even turned on -std=c++11 in the compiler flags. Here's someone with a similar question, who obviously hasn't figured out a workaround yet.

How should I make this compile? Meanwhile I'll try updating mingw32-g++...

EDIT:

Seems that 4.8.1 is the latest version... even though there's gcc-5.0.0 out there.

Upvotes: 0

Views: 816

Answers (1)

Serge Ballesta
Serge Ballesta

Reputation: 149175

Not really an answer, but welcome to real life. In theory, there should be one single C++ reference, with versions (C+11, C+14, ...) and all compilers should follow that, allowing everything specified and disallowing everything else.

In real world, compiler can reject constructs allowed by the spec and accept others that the spec would disallow. MSVC before 2010 was known to be very reluctant to standard, gcc is known to allow plenty of extensions, and it looks like you found a place where it not fully implements C++11 spec.

You can either try another compiler that would accept your input code, or do what older C programmers used to do in last century : find what should be the correct include files for your developpement environment. Maybe #include <locale> could be enough ...

BTW, the problem in not exactly in compiler part, but on standard library implementation ...

Upvotes: 2

Related Questions