Article View: comp.os.os2.programmer
Article #586Re: Help! Need to link 16bit LIB with 32bit Application
From: dave
Date: Thu, 30 Jul 1992 16:12
Date: Thu, 30 Jul 1992 16:12
43 lines
1796 bytes
1796 bytes
In <anderson.16.712435941@mayo.edu> Alfred I. Anderson writes:
> Sybase distributes a .LIB file that is linked in with a C appliaction to
> allow access to their data base on the network. Apparently it is not
> possible (?) to link this file against an application developed with the IBM
> CSet/2 compiler in 32 bit mode??
>
> Does anyone have a suggestion how we can link to this 16bit LIB??
You should probably get a list of the entry points in the library, list
these entry points in the EXPORTS sections of the .DEF file, and then
link the library as a .DLL. That is, if the library exports the entry
points foo() and bar() (with the _pascal calling convention), write a
.DEF file SYBASE.DEF:
LIBRARY SYBASE
EXPORTS
FOO @1
BAR @2
and a .DEF file MAIN.DEF:
NAME MAIN
IMPORTS
FOO =SYBASE.1
BAR =SYBASE.2
Link the .DLL as
link386 sybase.lib,sybase.dll,,,sybase.def
and your .EXE as
link386 main,main.exe,,,main.def
The syntax may be off a bit here and there, but I have used this method
successfully before.
dave
-------------------------------------------------------------------------
Dave Mooney dmm@vnet.ibm.com
C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
"If you've got a blacklist, I want to be on it"
Technical Details
Message-ID:
<19920730.091826.460@almaden.ibm.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.comReferences:
<anderson.16.712435941@mayo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com From: dmm@vnet.ibm.com (dave) Message-ID: <19920730.091826.460@almaden.ibm.com> Date: Thu, 30 Jul 92 12:12:01 EDT Newsgroups: comp.os.os2.programmer Subject: Re: Help! Need to link 16bit LIB with 32bit Application Organization: IBM Canada Lab News-Software: UReply 3.0 X-X-From: dmm@vnet.ibm.com (Dave Mooney) References: <anderson.16.712435941@mayo.edu> Lines: 43