Advertisement

Compiler warning about missing ending '

Started by March 26, 2017 01:45 PM
3 comments, last by Boost113 7 years, 7 months ago

This check in some of the add-ons:


#ifdef AS_CAN_USE_CPP11
#include <chrono>
#else
#error Sorry, this requires C++11 which your compiler doesn't appear to support
#endif

Causes warnings about there being a missing ' character:


/home/hhyyrylainen/Projects/leviathan/libraries/include/add_on/datetime/datetime.h:12:60: varoitus: päättävä merkki ' puuttuu
 #error Sorry, this requires C++11 which your compiler doesn't appear to support
                                                            ^

This is nothing major, but it does cause annoying warnings when rebuilding files that include the add-on headers.

Try escaping the single quotation mark. \'

Edit: oh...this is the angelCode forum..my bad.

Throwing stuff at my 'Hobby Game"

Advertisement
You can just put the entire string in double quotes, and it should be fine. \' should also work. Or '''.

The issue is that technically ' is not a valid preprocessor token unless it is part of a character constant or part of a string literal. Some compilers ignore this restriction, so the code you provided may or may not cause an error.

Thanks Boost113. I'll have this fixed.

*EDIT*

This had already been fixed last year, in revision 2331. I guess you haven't updated the library and/or add-ons in a while.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement