Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How different is C code likely to be from OS 8 to OS X?

How different is C code likely to be from OS 8 to OS X?
Thread Tools
Mac Elite
Join Date: Feb 2001
Location: adrift in a sea of decadent luxury and meaningless sex
Status: Offline
Reply With Quote
Aug 2, 2002, 11:26 PM
 
Say I have some libraries that are in the form of header.h and library.lib (you can see them at http://download.microsoft.com/downlo..._PPC_Setup.hqx ), and in all likelihood they were created 2 years ago. Is it possible to use them to compile code for OS X? Are the .lib files tied to OS pre-X? I can get Hello World to compile with the headers included, but I can't call any functions from the headers. If I call function x, project builder and cc both give the linking error undefined symbol _x

is there any hope?

TIA
blackmail is such an ugly word. I prefer extortion. the X makes it sound cool
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 4, 2002, 07:40 AM
 
Unless the library is Carbon, you won't be able to use it. If it is Carbon, it is probably CFM, which means you'll have to either use a CFM binary or call the CFM API at runtime to use it.
     
Forum Regular
Join Date: Jan 2001
Location: Boston, MA
Status: Offline
Reply With Quote
Aug 5, 2002, 02:16 PM
 
If you can compile the code on Mac OS X, using Project Builder/gcc or CodeWarrior, you may be able to use the CoreFoundation CFBundle APIs to call the functions within the code. You'll need to know all the function signatures beforehand though (functions names, parameters and return types).
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 5, 2002, 02:21 PM
 
Originally posted by SoClose:
If you can compile the code on Mac OS X, using Project Builder/gcc or CodeWarrior, you may be able to use the CoreFoundation CFBundle APIs to call the functions within the code. You'll need to know all the function signatures beforehand though (functions names, parameters and return types).
He doesn't have the code, it's a precompiled library.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:08 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2