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)