Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

trying to use GCC to build a DLL library for firebird

61 views
Skip to first unread message

rayh...@yahoo.com

unread,
Apr 27, 2012, 11:25:10 AM4/27/12
to
I used to do this using Borland C but no longer have that machine. I
have been told that the free Microsoft compiler will work, but I am a
Unix/Linux person and would prefer to use gcc on the Windows
machine(s) for compilation.

Compiling the user-defined-function source works fine (I have
appropriate __cdecl defined for the functions just as needed in
Borland's compiler without __export). However linking the DLL is not
so good - the problem appears to be in using the firebird libraries. I
have both the library and dll versions of both in my current working
directory (for now - till I get it working, then I will try using the
"-L" option ....). From what I can see, gcc does NOT like these
libraries.

Below is the command as entered on the PC and the error follows.

E:\ray\vetadmin\UDF>gcc -shared -o vetAdmin.dll udf.o ^
More? -Wl,--out-implib=libvetAdmin.dll.a ^
More? -Wl,--export-all-symbols ^
More? -Wl,--enable-auto-import ^
More? -Wl,--whole-archive fbclient_ms.lib ^
More? -Wl,--whole-archive ib_util_ms.lib

fbclient_ms.lib: member fbclient_ms.lib(fbclient.dll) in archive is
not an object
collect2: ld returned 1 exit status

I also know that before the final compile and build with Borland I had
to use the
"implib" command (NO idea why) and it is not part of the gcc version
(I think).

Does anyone know how to link using someone elses .lib files (C++
based)??

Andrew Haley

unread,
Apr 27, 2012, 12:02:06 PM4/27/12
to
rayh...@yahoo.com wrote:
> I used to do this using Borland C but no longer have that machine. I
> have been told that the free Microsoft compiler will work, but I am a
> Unix/Linux person and would prefer to use gcc on the Windows
> machine(s) for compilation.

I am a gcc maintainer, but I don't know the answer to this one: gcc on
Windows is outside my experience. You might get a better result by
asking the gcc-help list.

http://gcc.gnu.org/lists.html

Andrew.

rayh...@yahoo.com

unread,
Apr 27, 2012, 5:17:30 PM4/27/12
to
On Apr 27, 12:02 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:
Thanks Andrew - will try that.
0 new messages