From: Paul G. <pga...@qw...> - 2001-12-16 00:04:39
|
Hi folks, On 15 Dec 2001 at 5:07, Adam Megacz wrote: > > Hey, can anybody here see what I'm doing wrong trying to get this > simple program to link? [skip] > --enable-threads=win32 --enable-sjlj-exceptions Thread model: win32 > gcc version 3.1 20011209 (experimental) > /usr/local/cross-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/cc1 -lang-c -v > -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D_WIN32 > -D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ -D__MSVCRT__ -DWINNT > -D_X86_=1 -D_WIN32 -D__WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ > -D__MSVCRT__ -D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT -Asystem=winnt > -D__NO_INLINE__ -D__STDC_HOSTED__=1 -remap -Acpu=i386 -Amachine=i386 > -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ > -D__stdcall=__attribute__((__stdcall__)) > -D__cdecl=__attribute__((__cdecl__)) > -D_stdcall=__attribute__((__stdcall__)) > -D_cdecl=__attribute__((__cdecl__)) > -D__declspec(x)=__attribute__((x)) t.c -quiet -dumpbase t.c -version > -o /tmp/ccXWFdZj.s > GNU CPP version 3.1 20011209 (experimental) (cpplib) (80386, BSD > syntax) GNU C version 3.1 20011209 (experimental) (i686-pc-mingw32) > compiled by GNU C version 3.1 20011207 (experimental). Umm...is there some reason you are trying this cross-compile using an unstable beta release of Mingw Gcc? Nothing wrong with it, was just curious. > ignoring nonexistent directory > "/usr/local/cross-gcc/i686-pc-mingw32/sys-include" #include "..." > search starts here: #include <...> search starts here: > /usr/local/cross-gcc/include > /usr/local/cross-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/include > /usr/local/cross-gcc/i686-pc-mingw32/include > End of search list. > /usr/local/cross-gcc/i686-pc-mingw32/bin/as --traditional-format -o > /tmp/ccB5mY4m.o /tmp/ccXWFdZj.s > /usr/local/cross-gcc/i686-pc-mingw32/bin/ld -Bdynamic > /usr/local/cross-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686 > -pc-mingw32/lib/crt2.o > -L/usr/local/cross-gcc/lib/gcc-lib/i686-pc-mingw32/3.1 > -L/usr/local/cross-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i6 > 86-pc-mingw32/lib -lgdi32 /tmp/ccB5mY4m.o -lmingw32 -lgcc -lmoldname > -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc > -lmoldname -lmsvcrt > /tmp/ccB5mY4m.o(.text+0x5f):t.c: undefined reference to > `CreateDIBSection@24' Think you may need to add -mwindows switch as CreateDIBSection is part of wingdi.h. CreateDIBSection is not loaded if -mwindows or -lgdi32 are not set at compile time. Try adding -mwindows switch at compile time (see http://www.mingw.org/docs.shtml for more on "Compiling and Building with Mingw"). Paul G. |