You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
I have a client who wants to make his product available for use with PowerBASIC for Windows. The outstanding question is can PowerBASIC statically link with a C LIB?
Thanks,
Rich
------------------
_____________________________________________________________________________________
It's hard when you're up to your armpits in alligators to remember you came here to drain the swamp.
President Reagan
February 10, 1982
No, LIB files are not a 100% standardized file format. For example, Microsoft C and Borland C use different, non-compatible LIB files.
You'd need to use the header file (usually *.H) not the LIB file, and convert the header syntax to PowerBASIC. It's usually not hard, and you can get help on this BBS.
As Eric says, there is no standard .LIB format. In general, the only
thing you can use a .LIB with is the exact same compiler as produced
it, which is probably going to be a C compiler, as other languages
tend not to support .LIBs these days.
The standard library format these days is the .DLL, or dynamic link
library. Like virtually every other Windows language, the PowerBASIC
for Windows compilers do provide support for DLLs.
Originally posted by Eric Pearson: No, LIB files are not a 100% standardized file format. For example, Microsoft C and Borland C use different, non-compatible LIB files.
You'd need to use the header file (usually *.H) not the LIB file, and convert the header syntax to PowerBASIC. It's usually not hard, and you can get help on this BBS.
-- Eric
Yes, since I use both C++ Builder and "Visual" C++, I am well aware they are not standardized. I was wondering if PowerBASIC supported any format.
Rich
------------------
[This message has been edited by Rich Brockway (edited October 13, 2001).]
_____________________________________________________________________________________
It's hard when you're up to your armpits in alligators to remember you came here to drain the swamp.
President Reagan
February 10, 1982
Originally posted by Tom Hanlin: [...]is probably going to be a C compiler, as other languages
tend not to support .LIBs these days.[...]
What about Assembly? MASM for example does support lib's.
What I'd love to see, is a Format, wich let me get rid of dll's. lib support or a new PowerBASIC format (.pib ) would be really nice. Just imagine: an ezgui App w/out ezgui dll...
The problem is that PowerBASIC uses a wider range of data types
than C/C++ so compatibility would be a problem even if PowerBASIC
did support libraries.
The DLL route would bve the easiest way to approach the problem
and your customer could make a useful multilanguage DLL that could
be used in any language that supports the industry standard DLL
format.
The last choice would be to rewrite the library module in PowerBASIC
but this may not suit your customer's requirements.
Would love to see possibility to use some sort of encrypted include files
in the future. Would enable us to write "commercial" code for PB developers,
without having to use DLL way. "One code - one EXE" is nice, IMHO. Could
mean a whole new industry growing up around PowerBasic compilers..
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment