I’m a bit confused that UNICODE is defined by Poco::Foundation publicly, with no way to turn it off.
As a result, every library that links against Poco::Foundation is effectively forced to have UNICODE and _UNICODE defined. While using UNICODE is generally recommended for Win32 projects, this isn’t always the case, there are situations where developers prefer to build applications in ANSI mode.
I also noticed that Poco builds fine even when UNICODE and _UNICODE are not enabled.
So my questions are:
- Is it a strict requirement that Poco be built with
UNICODE and _UNICODE on Win32?
- Is it a strict requirement that client projects have these definitions?
For reference, this is the line where UNICODE is defined:
https://github.com/pocoproject/poco/blob/poco-1.14.2-release/Foundation/CMakeLists.txt#L140
I’m a bit confused that
UNICODEis defined byPoco::Foundationpublicly, with no way to turn it off.As a result, every library that links against
Poco::Foundationis effectively forced to haveUNICODEand_UNICODEdefined. While usingUNICODEis generally recommended for Win32 projects, this isn’t always the case, there are situations where developers prefer to build applications in ANSI mode.I also noticed that Poco builds fine even when
UNICODEand_UNICODEare not enabled.So my questions are:
UNICODEand_UNICODEon Win32?For reference, this is the line where
UNICODEis defined:https://github.com/pocoproject/poco/blob/poco-1.14.2-release/Foundation/CMakeLists.txt#L140