laudrup/boost-wintls

UNICODE error

DraconPern opened this issue · 4 comments

Trying out the project and I noticed that UNICODE is being redefined in wtypes.h FYI, the compiler defines UNICODE to create unicode enabled programs (vs mbcs). I think using the native libs might better like so:

#define WIN32_LEAN_AND_MEAN 
#define SECURITY_WIN32
#include <sspi.h>

in config.hpp instead of hard coding lots of windows types in wtypes.h. Alternatively wtypes.h seems to work if the UNICODE define line is commented out.

Hi @DraconPern,

Thanks a lot for your interest in this project. It's really appreciated.

The reason for wtypes.h was an idea I had to avoid Windows headers all together to avoid all the issues Windows headers introduce, but in the local experiments I have made, it has turned out to be far from trivial to do so.

I think the correct solution for now is to get rid of wtypes.h since it's not really solving anything and just depend on the Windows headers which I am anyway for all the types/functions etc. not defined in this library.

I will look into that when time allows it. You are of course also welcome to submit a pull request :-)

I'm fairly certain this has be resolved in 372a82b.

Please let me know if this is not the case, otherwise I'll close this task.

Thanks.

As I haven't heard anything else I assume this has been fixed. CI jobs have been added to test building with and without UNICODE defined.

Haven't had a chance to test, but I think that's fine!