c++winapi

Undefined reference to LONG_PTR , Digital Mars C++ compiler problem


I am using the Win Api. My program uses LONG_PTR. It compiles fine with both MinGW and Borland C++ Compiler. But when I try to compile it using the Digital Mars C++ Compiler it gives an error undefined reference to LONG_PTR. Do I have to link extra libraries for DMC, or does the DMC not support WinApi fully, or is LONG_PTR defined by some other name?


Solution

  • Most likely, the Windows headers simply don't have a correct #ifdef for that compiler. MSDN lists the types of all Windows API types, so it should be easy for you to look it up and provide the correct type.