lotus



previous page: 1.12) What about protected memory? I'm sick and tired of re-booting when my application crashes. (Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 1.14) CodeWarrior vs. Think/Symantec C++: Which is better?

1.13) I have this library written in (Think) Pascal that I want to use from Think C/Symantec C, but I get link errors/don't know how to do it. What should I do? (Mac Programming)




Description

This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.

1.13) I have this library written in (Think) Pascal that I want to use from Think C/Symantec C, but I get link errors/don't know how to do it. What should I do? (Mac Programming)

Start by writing a .h file describing the interface. Remember to
declare the Pascal functions "pascal". Build a library with Think Pascal
and convert it with oConv.

Do you get link errors on symbols defined in your Pascal lib? Check the
capitalisation used.

Do you get errors on symbols like LMUL and LDIV? Those functions are
defined in the Think Pascal library Runtime.lib or uRuntime.lib. Include
uRuntime.lib and try again.

Do you get link errors on standard symbols like thePort? This is due to
bad capitalization in Symantec's libs. Run oConv with .v checked. This
will create a TEXT file with a .v extension. Open that with a text
editor and correct the capitalization. Run oConv again, with .v checked
this time too.

Do you still get errors on standard symbols? Are you using Think
C/Symantec C++ version 6 or higher? Then you must open the library (after
converting it) from Think C version 5, and remove the unit named
%_TOOLBOX. (If I'm not mistaken, this is the toolbox init unit, which
you won't need anyway.)

 

Continue to:















TOP
previous page: 1.12) What about protected memory? I'm sick and tired of re-booting when my application crashes. (Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 1.14) CodeWarrior vs. Think/Symantec C++: Which is better?