From: Sylvain B. <syl...@li...> - 2003-01-12 11:18:49
|
Hello, I downloaded the MinGW big .exe install program, and I installed it in C:\MinGW. But when I try to compile any file, I get strange "undefined reference" errors. eg: $ cat hello.c #include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } $ gcc hello.c c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/../../../crt2.o(.text+0x8d):crt1.c: undefined reference to `SetUnhandledExceptionFilter@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/../../../crt2.o(.text+0x170):crt1.c: undefined reference to `ExitProcess@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x1 ed): undefined reference to `CreateMutexA@12' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x2 39): undefined reference to `InterlockedIncrement@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x2 56): undefined reference to `Sleep@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x2 e4): undefined reference to `ReleaseMutex@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x2 f9): undefined reference to `WaitForSingleObject@8' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x3 c2): undefined reference to `ReleaseMutex@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x3 dc): undefined reference to `WaitForSingleObject@8' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x4 b2): undefined reference to `ReleaseMutex@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x4 ee): undefined reference to `ReleaseMutex@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x5 11): undefined reference to `WaitForSingleObject@8' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x1 003): undefined reference to `ReleaseMutex@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x1 033): undefined reference to `WaitForSingleObject@8' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(w32-shared-ptr.o)(.text+0x6 1): undefined reference to `FindAtomA@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(w32-shared-ptr.o)(.text+0x1 22): undefined reference to `AddAtomA@4' c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/libgcc.a(w32-shared-ptr.o)(.text+0x1 82): undefined reference to `GetAtomNameA@12' The same problem occur with the sample windows code given in the documentation on mingw.org. I just installed the package and I did not changed anything. I tried the process several times (install/uninstall/install/uninstall...) before to write to the list. Any clue? -- Sylvain Beucler |