Compile error with GetMessageA


When I write such code:

catch(pdftron::Common::Exception& ex) { std::cout << ex.GetMessage() << std::endl; }

I get compilation error:


error C2039: ‘GetMessageA’: is not a member of ‘pdftron::Common::Exception’


GetMessage is a windows macro, either

#define GetMessage GetMessageA


#define GetMessage GetMessageW

depending on unicode setting.

Before including the PDFNet headers, add the following

#undef GetMessage

If you need to also use the windows version, be explicit, for example