Skip to content

Question about the requirements for defining UNICODE and _UNICODE on Win32 #5037

Description

@slabko

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:

  1. Is it a strict requirement that Poco be built with UNICODE and _UNICODE on Win32?
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions