Semantic Compiler Errors (general question)
I have included and linked the latest Boost C++ library into my build. I tested the library beforehand. However, when simply including the header files in a C++ actor class in my Unreal game project, I get errors like: Warning Example: Error boost/config/stdlib/dinkumware.hpp(99) : warning C4668: '_HAS_NAMESPACE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' Error Examples: Error boost/intrusive/slist.hpp(1926) : error C4003: not enough actual parameters for macro 'check' Error boost/intrusive/slist.hpp(1926) : error C2062: type 'void' unexpected It looks like there is some strict/unsupported semantic issues with the compiler that is being used. How do I fix this? I am on Windows with VS 2017. Sample programs compile fine with just cl /EHsc /I boost_1_64_0 test_game.cpp /link /LIBPATH:"F:\boost_1_64_0\stage\lib" Why would the compiler not work from within Unreal? Thanks, Regards, James
AMDG On 06/10/2017 05:01 PM, James Stortz via Boost-users wrote:
I have included and linked the latest Boost C++ library into my build. I tested the library beforehand. However, when simply including the header files in a C++ actor class in my Unreal game project, I get errors like:
Warning Example:
Error boost/config/stdlib/dinkumware.hpp(99) : warning C4668: '_HAS_NAMESPACE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
This behavior is mandated by the standard. The code is correct.
Error Examples:
Error boost/intrusive/slist.hpp(1926) : error C4003: not enough actual parameters for macro 'check'
This is an errant macro from outside Boost.
Error boost/intrusive/slist.hpp(1926) : error C2062: type 'void' unexpected
It looks like there is some strict/unsupported semantic issues with the compiler that is being used. How do I fix this?
I am on Windows with VS 2017.
Sample programs compile fine with just
cl /EHsc /I boost_1_64_0 test_game.cpp /link /LIBPATH:"F:\boost_1_64_0\stage\lib"
Why would the compiler not work from within Unreal?
In Christ, Steven Watanabe
Error Examples:
Error boost/intrusive/slist.hpp(1926) : error C4003: not enough actual parameters for macro 'check'
This is an errant macro from outside Boost.
In fact this issue has been reported here. https://answers.unrealengine.com/questions/391017/constant-library-conflicts... -- chris
On 6/11/2017 8:05 PM, Chris Glover via Boost-users wrote:
> Error Examples: > > Error boost/intrusive/slist.hpp(1926) : error C4003: not enough actual > parameters for macro 'check' >
This is an errant macro from outside Boost.
In fact this issue has been reported here.
https://answers.unrealengine.com/questions/391017/constant-library-conflicts...
Macros should always be capitalized and they should have distinct prefixes which no one else is likely to use. Among organization that have not followed this near foolproof scheme is Microsoft themselves.
-- chris
participants (4)
-
Chris Glover
-
Edward Diener
-
James Stortz
-
Steven Watanabe