[LLVMdev] Build problems on MinGW

Duncan Pierce duncan at duncanpierce.org
Sat Jan 17 14:04:08 PST 2009


Hi Anton

>> $ g++ -g tut1.cpp `llvm-config --cxxflags --ldflags --libs core` -o tut1
>> /mingw/lib/libLLVMSystem.a(Process.o):Process.cpp:(.text+0x8d):
>> undefined reference to `GetProcessMemoryInfo at 12'
>> collect2: ld returned 1 exit status
> I believe you will need additional libraries like imagehlp and psapi.

I have /lib/libimagehlp.a  and /lib/libpsapi.a

nm --defined-only /lib/libpsapi.a | grep "GetProcessMemoryInfo" -

returns:

00000000 T _GetProcessMemoryInfo at 12
00000000 I __imp__GetProcessMemoryInfo at 12

And llvm-config seems to be asking for them to be picked up:

-I//include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2
-fomit-frame-pointer  -Woverloaded-virtual
-L//lib  -lpsapi -limagehlp -lm
-lLLVMCore -lLLVMSupport -lLLVMSystem

So I'm still mystified.

Best regards,
Duncan



More information about the llvm-dev mailing list