[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] gd undefined references
From: |
Volker Grabsch |
Subject: |
Re: [Mingw-cross-env-list] gd undefined references |
Date: |
Fri, 22 Oct 2010 23:46:52 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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
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`
Unfortunately there's no pkg-config integration of GD. That would
have allowed you to do simply this:
i686-pc-mingw32-gcc gd1.c `i686-pc-mingw32-pkg-config gd --cflags --libs`
Greets,
Volker
--
Volker Grabsch
---<<(())>>---