[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mingw-cross-env-list] gd undefined references
From: |
super pollo |
Subject: |
[Mingw-cross-env-list] gd undefined references |
Date: |
Sat, 23 Oct 2010 07:45:05 +0200 |
excuse me for duplicate messages, but i could not reply correctly from gmail.
2010/10/22 Volker Grabsch <address@hidden>:
thanks for replying.
> 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'
/tmp/ccYl8lxj.o:gd1.c:(.text+0x46): undefined reference to
`_gdImageColorAllocate'
/tmp/ccYl8lxj.o:gd1.c:(.text+0x6e): undefined reference to
`_gdImageColorAllocate'
/tmp/ccYl8lxj.o:gd1.c:(.text+0xa6): undefined reference to `_gdImageLine'
/tmp/ccYl8lxj.o:gd1.c:(.text+0xea): undefined reference to `_gdImagePng'
/tmp/ccYl8lxj.o:gd1.c:(.text+0x106): undefined reference to `_gdImageJpeg'
/tmp/ccYl8lxj.o:gd1.c:(.text+0x12a): undefined reference to `_gdImageDestroy'
collect2: ld returned 1 exit status
> 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'
collect2: ld returned 1 exit status
as you can see, i still get errors, slightly different than before though.
bye