mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] gd undefined references


From: super pollo
Subject: Re: [Mingw-cross-env-list] gd undefined references
Date: Sat, 23 Oct 2010 16:19:34 +0200

2010/10/23 Volker Grabsch <address@hidden>:
> super pollo <address@hidden> schrieb:
>> 2010/10/22 Volker Grabsch <address@hidden>:
>> > super pollo <address@hidden> schrieb:
>> >> $ i686-pc-mingw32-gcc -lgd -lpng -lz -ljpeg -lfreetype -lm gd1.c
>> >>
>> >> but i got this:
>> >>
>> >> /tmp/ccmNaNdn.o:gd1.c:(.text+0x26): undefined reference to address@hidden'
>> >
>> > You have to add the "-DNONDLL" option:
>> >
>> > i686-pc-mingw32-gcc -lgd -lpng -lz -ljpeg -lfreetype -lm -DNONDLL gd1.c
>>
>> nope:
>>
>> $ i686-pc-mingw32-gcc -lgd -lpng -lz -ljpeg -lfreetype -lm -DNONDLL gd1.c
>> /tmp/ccYl8lxj.o:gd1.c:(.text+0x1e): undefined reference to `_gdImageCreate'
>> [...]
>
> Sorry, I forgot to mention that "gd1.c" should be noted before the libs:
>
> i686-pc-mingw32-gcc gd1.c -lgd -lpng -lz -ljpeg -lfreetype -lm -DNONDLL
>
>
>> > Note that the "gdlib-config" script provides almost all options
>> > you need, so you could also use the following command:
>> >
>> > i686-pc-mingw32-gcc gd1.c -lgd `.../usr/i686-pc-mingw32/bin/gdlib-config 
>> > --cflags --libs`
>>
>> nope:
>>
>> $ i686-pc-mingw32-gcc gd1.c -lgd `gdlib-config --cflags --libs`
>> /tmp/cc40GgWU.o:gd1.c:(.text+0xea): undefined reference to `_gdImagePng'
>
> Here you are using the native "gdlib-config" of your system. However,
> you need the one of the cross toolchain! That's what I denoted as
> ".../usr/" in the example command above.
>
> Also note that Mingw-cross-env's ".../usr/i686-pc-mingw32/bin/" directory
> is _not_ in the PATH and should _never_ be added to PATH.
>
> BTW, don't confuse that with ".../usr/bin/" (outside of the "i686-pc-mingw32/"
> directory), which _is_ meant to be added to PATH.

sorry to bother, but still got problems:

~/mingw$ echo $PATH
/etc/script:/home/2009/massimo2/.bin:/home/2009/massimo2/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/opt/delsafe/bin:/opt/dev86/bin:/opt/gnome/bin:/opt/htmlcheck/bin:/opt/ipwatch/bin:/opt/makeboot/bin:/opt/nmag/bin:/opt/typeit/bin:/home/2009/massimo2/mingw/mingw-cross-env-2.15/usr/bin

~/mingw$ mingw-cross-env-2.15/usr/i686-pc-mingw32/bin/gdlib-config
--cflags --libs
-I/home/2009/massimo2/mingw/mingw-cross-env-2.15/usr/i686-pc-mingw32/include
-DNONDLL
-ljpeg -lfreetype -lz
-L/home/2009/massimo2/mingw/mingw-cross-env-2.15/usr/i686-pc-mingw32/lib
-lxml2 -lz -lws2_32

~/mingw$ i686-pc-mingw32-gcc gd1.c -lgd
`mingw-cross-env-2.15/usr/i686-pc-mingw32/bin/gdlib-config --cflags
--libs`
/tmp/ccemoMs2.o:gd1.c:(.text+0xea): undefined reference to `_gdImagePng'
collect2: ld returned 1 exit status

but at least there are fewer :-(

bye



reply via email to

[Prev in Thread] Current Thread [Next in Thread]