[LLVMdev] DynamicLibrary.inc compile error /w vc++2005 and windows sdk 6.1

Tareq A. Siraj tareq.siraj at rapidmind.com
Wed Apr 8 12:07:43 PDT 2009

Hello there,
I'm having a problem compiling llvm with vc++ 2005 and windows sdk6.1. 
It seems that the Platform SDK supplied with vc++2005 uses PSTR for the 
first param of PENUMLOADED_MODULES_CALLBACK64 typedef (dbghelp.h) and 
the windows sdk 6.1 (also windows sdk 6.0a that ships with vc++2008) 
uses PCSTR. The _MSC_VER macro guard for ELM_Callback(...) kinda kills 
the possibility of using VC++2005 with SDK 6.1 and without the macro 
guard, one will require to have SDK6.0A+ setup with vc++2005. Is there 
any known workaround to this issue?

1>d:\dev\llvm\lib\system\Win32/DynamicLibrary.inc(116) : error C2664: 
'EnumerateLoadedModules' : cannot convert parameter 2 from 'BOOL 
(__stdcall *)(PSTR,llvm::ModuleBaseType,ULONG,PVOID)' to 

I saw one old post from 2007 titled "LLVM 2.1 with VC++" in this list 
stating the same thing but this wasn't fixed probably due to failure to 
reproduce. Any suggestion would be appreciated. Thanks.

Tareq Ahmed Siraj
RapidMind Inc.

More information about the llvm-dev mailing list