I am converting C++ codes from Linux to windows (using Visual Studio 2013). But MSVC has length limit on string (around 2048 bytes?), the GCC doesn't instead. My problem is that, there is a config file containing several huge string, it works well under GCC. But MSVC reports compile error as
error C2026: string too big, trailing characters truncated.
The string is quite simple, CONFIGSTRING
is huge.
const std::string CONFIGSTRING="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
Any solution for this problem? Can I separately compile the config file to object file using GCC under windows and link it to other files? If possible, anyone can briefly show me how to do it?