[cfe-users] Building clang's static analyzer on Windows
Jeffrey Walton
noloader at gmail.com
Thu Jul 23 02:45:43 PDT 2015
> D:/Clang/msys/1.0/src/llvm/lib/Support/Windows/DynamicLibrary.inc:34:56:
> error: 'PENUMLOADED_MODULES_CALLBACK64' has not been declared
>
> typedef BOOL (WINAPI
> *fpEnumerateLoadedModules)(HANDLE,PENUMLOADED_MODULES_CALLBACK64,PVOID);
> ^
>
> D:/Clang/msys/1.0/src/llvm/lib/Support/Windows/DynamicLibrary.inc: In static
> member function 'static llvm::sys::DynamicLibrary
> llvm::sys::DynamicLibrary::getPermanentLibrary(const char*, std::string*)':
>
> D:/Clang/msys/1.0/src/llvm/lib/Support/Windows/DynamicLibrary.inc:70:65:
> error: invalid conversion from 'BOOL (__attribute__((__stdcall__)) *)(PSTR,
> DWORD64, ULONG, PVOID) {aka int (__attribute__((__stdcall__)) *)(char*, long
> long unsigned int, long unsigned int, void*)}' to 'int' [-fpermissive]
>
> fEnumerateLoadedModules(GetCurrentProcess(), ELM_Callback, 0);
PENUMLOADED_MODULES_CALLBACK64 and PENUMLOADED_MODULES_CALLBACKW64 are
declared in DbgHelp.h. See
https://msdn.microsoft.com/en-us/library/windows/desktop/ms679317%28v=vs.85%29.aspx
Open the file giving you trouble, and manually add the include.
Or, open the file in question and manually add the typedef. The
typedef is provided on the MSDN page.
(If you are building LLVM/Cfe/Tools/etc from scratch, be prepared for
some of this sort of thing).
Jeff
More information about the cfe-users
mailing list