> On 2009-10-02 01:07, 罗勇刚(Yonggang Luo) wrote: > > Well, Now I get the solution. > > Please, someone can apply the patch. > > > > Just modify the makefile resident in lib/System > > > > But, a new error is appeared > > llvm[2]: Linking Debug unit test ADT > > d:/objs/llvm/msys/Debug/lib/libLLVMSystem.a(Process.o):e:/Downloads/llvm-trunk/lib/System/Win32/Process.inc:78: > > undefined reference to `GetProcessMemoryInfo at 12' > > GetProcessMemoryInfo should be defined in psapi.lib, but AFAICS mingw32 > doesn't have this import lib. It is included in the MS Platform SDK, > but I'm not sure whether you can link that into mingw32 programs...msdn suggests kernel32, but that is already included. Ronald
On 2009-10-02 19:34, Ronald Pijnacker wrote:>> On 2009-10-02 01:07, 罗勇刚(Yonggang Luo) wrote: >>> d:/objs/llvm/msys/Debug/lib/libLLVMSystem.a(Process.o):e:/Downloads/llvm-trunk/lib/System/Win32/Process.inc:78: >>> undefined reference to `GetProcessMemoryInfo at 12' >> GetProcessMemoryInfo should be defined in psapi.lib, but AFAICS mingw32 >> doesn't have this import lib. It is included in the MS Platform SDK, >> but I'm not sure whether you can link that into mingw32 programs... > msdn suggests kernel32, but that is already included.My apologies, I was mistaken, as Yonggang pointed out to me privately; mingw32 does come with a libpsapi.lib file, but in your case it does not get added to the libs to be linked with, apparently. In my case, the configure script does check for the existence of libpsapi.a, and adds both a HAVE_LIBPSAPI define to config.h, and -lpsapi to LIBS. Can you find anything in your config.log file about libpsapi?
> >>> d:/objs/llvm/msys/Debug/lib/libLLVMSystem.a(Process.o):e:/Downloads/llvm-trunk/lib/System/Win32/Process.inc:78: > >>> undefined reference to `GetProcessMemoryInfo at 12' > >> GetProcessMemoryInfo should be defined in psapi.lib, but AFAICS mingw32 > >> doesn't have this import lib. It is included in the MS Platform SDK, > >> but I'm not sure whether you can link that into mingw32 programs... > > msdn suggests kernel32, but that is already included. > > My apologies, I was mistaken, as Yonggang pointed out to me privately; > mingw32 does come with a libpsapi.lib file, but in your case it does not > get added to the libs to be linked with, apparently. > > In my case, the configure script does check for the existence of > libpsapi.a, and adds both a HAVE_LIBPSAPI define to config.h, and > -lpsapi to LIBS. > > Can you find anything in your config.log file about libpsapi?#define HAVE_LIBPSAPI 1 in config.h Ronald