Re: VS2005 compiler with /clr gets confused with GetJob



draskin wrote:

#ifdef UNICODE
#define GetJob GetJobW
#else
#define GetJob GetJobA
#endif // !UNICODE

Just for kicks I deleted this block and all of a sudden the linker worked!

I don't recommend modifying vendor supplied include files. There may be other project out there that require that #define.

The workaround for your problem would be using #undef:

#include <windows.h>
#undef GetJob

Tom
.



Relevant Pages

  • RE: Problem linking managed DLL to native DLL
    ... Managed dll references this method and compiles just fine. ... Notice that the linker is complaining about GetJobW, ... bluntly #undef GetJob in the header file of your unmanaged class. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: VS2005 compiler with /clr gets confused with GetJob
    ... I tried using #undef, but then compiler doesn't recognize my won GetJob... ... #define GetJob GetJobW ... Just for kicks I deleted this block and all of a sudden the linker ...
    (microsoft.public.vc.language)

Loading