Subject | Re: [firebird-support] Re: building a DLL and trying to use gcc |
---|---|
Author | Ray Holme |
Post date | 2012-05-01T13:11:33Z |
Sorry - I expected two lines of error at the end of the "ld" step of gcc
and did not read them. I was trying to not have to copy the ".lib" files
to my directory. Anyway, the builddll.bat file should not have a "-L"
option as it does not work; the results file posted was wrong as it
should whine about the routines not the libraries not found; finally the
source file seems to not have been include - for some reason it was seen
as not text. Not sure how to fix the latter, but below are the
corrections and one more try with the source file (this time in Linux
line ending format).
----------
gcc -c -I "C:/Program Files/Firebird/Firebird_2_5/include" -DWIN32 -o sample.o sample.c
gcc -shared -o sample.dll sample.o ^
fbclient_ms.lib ib_util_ms.lib -Wl,--export-all-symbols -Wl,--enable-auto-import
----------
builddll.bat
gcc -c -I "C:/Program Files/Firebird/Firebird_2_5/include" -DWIN32 -o sample.o sample.c
gcc -shared -o sample.dll sample.o fbclient_ms.lib ib_util_ms.lib ^
-Wl,--export-all-symbols -Wl,--enable-auto-import
sample.o:sample.c:(.text+0x91): undefined reference to `isc_decode_date@8'
sample.o:sample.c:(.text+0xc8): undefined reference to `ib_util_malloc'
collect2: ld returned 1 exit status
[Non-text portions of this message have been removed]
and did not read them. I was trying to not have to copy the ".lib" files
to my directory. Anyway, the builddll.bat file should not have a "-L"
option as it does not work; the results file posted was wrong as it
should whine about the routines not the libraries not found; finally the
source file seems to not have been include - for some reason it was seen
as not text. Not sure how to fix the latter, but below are the
corrections and one more try with the source file (this time in Linux
line ending format).
----------
gcc -c -I "C:/Program Files/Firebird/Firebird_2_5/include" -DWIN32 -o sample.o sample.c
gcc -shared -o sample.dll sample.o ^
fbclient_ms.lib ib_util_ms.lib -Wl,--export-all-symbols -Wl,--enable-auto-import
----------
builddll.bat
gcc -c -I "C:/Program Files/Firebird/Firebird_2_5/include" -DWIN32 -o sample.o sample.c
gcc -shared -o sample.dll sample.o fbclient_ms.lib ib_util_ms.lib ^
-Wl,--export-all-symbols -Wl,--enable-auto-import
sample.o:sample.c:(.text+0x91): undefined reference to `isc_decode_date@8'
sample.o:sample.c:(.text+0xc8): undefined reference to `ib_util_malloc'
collect2: ld returned 1 exit status
[Non-text portions of this message have been removed]