Closed changshuang closed 6 years ago
This is a preprocessor bug in VS2015. It has been fixed in VS2017. (It also doesn't happen in VS2013)
The reason you encounter this bug with FASTBuild is because it uses the preprocessor to power distributed compilation and caching.
If you are unable to update to VS2017, it seems you can work around this bug by inserting a space between the TEXT macros as follows:
dfaf( TEXT("\x5927\x9003\x6740\x6362\x88c5\x76f8\x5173") TEXT("BP\x7ed3\x6784\x6570\x636e"));
Link back to the related FASTBuild ticket: https://github.com/fastbuild/fastbuild/issues/347
fastbuild/fastbuild#347 has fixed it. Many thanks!
Here is a sample:
Environment: Platform:windows7 Vs:vs2015 wiht update 1 Unreal:4.13 Win10sdk installed but no used
If i do not use fastbuild, it will be compiled ok with no error. But if using fastbuild, compiling fails with error:
2>C:\Work\Project\fastbuild413\Source\fastbuild413\fastbuild413GameMode.cpp(9): error C2022: '32467': too big for character 2>C:\Work\Project\fastbuild413\Source\fastbuild413\fastbuild413GameMode.cpp(9): error C2022: '26500': too big for character 2>C:\Work\Project\fastbuild413\Source\fastbuild413\fastbuild413GameMode.cpp(9): error C2022: '25968': too big for character 2>C:\Work\Project\fastbuild413\Source\fastbuild413\fastbuild413GameMode.cpp(9): error C2022: '25454': too big for character 2>C:\Work\Project\fastbuild413\Source\fastbuild413\fastbuild413GameMode.cpp(9): error C3688: invalid literal suffix 'L'; literal operator or literal operator template 'operator ""L' not found
From microsoft, we can see tihis is an known error. But without fastbuild, it builds succeeded. I guess vc do something when preprocessor process definitions. But i can not fix the problem.
Need your help, many thanks!