0

I have been playing around with PDCurses and have been having a few problems. Eventually I landed here which had a solution to my problem.

Basically my PDCurses project was compiled with the UNICODE CHARACTER set. As a result the block character was being displayed as an upper case U. Setting the library to NOT SET as the character set solved this problem.

Is there a technique that would allow me to embed something in the source code for PDCurses that would detect which character set option was picked and do a compile time ASSERT if it is not set properly?

I have looked at the pragma listing. The conform option and runtime checks seem to do something similar.

EvilTeach
  • 28,120
  • 21
  • 85
  • 141
  • AFAIK, there is no compiler option "Character set". Selecting this switch in Visual Studio generates _UNICODE macro, that can be tested in the program text. – Alex F Aug 18 '13 at 14:55
  • 1
    Test _MBCS (Multi-byte) and _UNICODE macros. If none of them defined, character set is not selected. – Alex F Aug 18 '13 at 15:03

1 Answers1

0

It seems to work. Thanks

#ifdef _UNICODE
    #error "Unicode may not be set for this library"
#else
    #ifdef _MBCS
        #error "Multi Byte may not be set for this libary"
    #endif
#endif
EvilTeach
  • 28,120
  • 21
  • 85
  • 141