How to use C++ Standard Library? (std)


I have a pure C++ code base of about 3000 lines of code. The code that I have written solely uses C++ Standard Library and nothing else.
However when I merged the source into my project I get errors like the following:

The solutions provided here and here (although I don’t know how I’d do that with STL) did not help.

I simply want to use the C++ standard library but I don’t know how.

I can provide code samples and “classes” that I’m using for this.

Thanks in advance,



you could try to surround the related include (for example <map> for std::map) with:

#include “AllowWindowsPlatformTypes.h”
#include <windows.h>
#include <map>
#include “HideWindowsPlatformTypes.h”

But I do not know why namespace std is not being found.
Perhaps the precompilier has problems to parse the related header.

Sometimes unrecognized keywords or chars at the beginning of the header or before the class declaration are resulting in those error outputs.


Sorry I’ve tried that solution before but it didn’t work.
This is so frustrating…

Hm, I am using several std classes without problems.

Can you compile a simple cpp file with for example:

in void FooFile.cpp…

#include <vector>

std::vector<int> test;

Turns out we can’t use C++ standard library in C++ with unreal. I’m writing a wrapper class to convert from std to Unreal specific types.
Though I still have to include the precompiled project header. This slowed my program performance a lot which I’m not happy about it.
Thanks for the replies by the way.

I haven’t had any problems using the std lib personally. Could the problem be stemming from the platforms you are trying to target? For example: Android has limited support for the std lib (if I remember correct, it was the std FFT that had me beating my head against the wall for a bit until I looked into what parts of the std lib were actually supported on Android lol).