Did you tried with -L?
Do you the .lib of libgd?
On Apr 2, 2010, at 3:04 PM, Laurent Kappler <[email protected]>
wrote:
Hi,
I'm trying to compile hxGD library for windows target.
I'm using MinGW with MSYS which emulate a linux terminal.
So far I'm using this command line that compile right but to a
shared library that does not work. Because there's no linking to
neko.lib I guess:
gcc -Wall -shared -I/dev/neko/inlcude -I/dev/neko/lib/GnuWin32/
include -c -o src/nGD.ndll src/nGD
But when I try to link, at least gd with this
gcc -Wall -shared -I/dev/neko/inlcude -I/dev/neko/lib/GnuWin32/
include -I/dev/neko/lib/GnuWin32/lib -lgd -o src/nGD.ndll src/nGD
I got:
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin
\ld.exe: ne peut trouver -lgd
collect2: ld returned 1 exit status
-l should be looking for libgd.dll or libgd.dll.a ... I just have
libgd.dll.a in the -I folders.
Also I don't understand how gcc could find neko.lib as it
automaticly format what you put after -l to lib+somethinyouput
+.dll ... which -lneko won't ever match.
So I changed the name of the linked library to what gcc on windows
would excpect:
gcc -Wall -shared -I/dev/neko/inlcude -I/dev/neko/lib/GnuWin32/
include -I/dev/neko/lib/GnuWin32/lib -I/dev/neko -lgd -lneko -o src/
nGD.ndll src/nGD
which output this:
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x18): ré
férence indéfinie vers « _imp__val_true »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x3e): ré
férence indéfinie vers « _imp__gdimagecreatetrueco...@8 »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x51): ré
férence indéfinie vers « alloc_gc_image »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x5f): ré
férence indéfinie vers « getImage »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x74): ré
férence indéfinie vers « initColor »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x9c): ré
férence indéfinie vers « _imp__gdimagef...@16 »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0xb5): ré
férence indéfinie vers « _imp__gdimagecre...@8 »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0xc8): ré
férence indéfinie vers « alloc_gc_image »
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0xd6): ré
férence indéfinie vers « getImage »
[....]
C:/DOCUME~1/Laurent/LOCALS~1/Temp/ccKSUVtt.o:nGD.c:(.text+0x3e1): rÃ
©férence indéfinie vers « AddImage »
collect2: ld returned 1 exit status
So I guess the linking does not find the proper libgd.dll to link
to ...
If anyone could give a small insight I'll be glad, sorry for the
long post.
Thank you
Laurent
--
Neko : One VM to run them all
(http://nekovm.org)
--
Neko : One VM to run them all
(http://nekovm.org)