KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using CarbonLib under Mac OS 8 or Mac OS 9
PRODUCT: 4D Plugin Wizard | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: June 8, 2001

When writing a Carbon based plug-in for 4D you must link against the CarbonLibStub. The question becomes how does this work under Mac OS 8 and Mac OS 9? Under these systems the CarbonLib resides in the systems extension folder.

When the plug-in is run under Mac OS X the core Carbon libraries are called for Mac OS X. When running under Mac OS 8/9 if the call is specific to Carbon then the call is executed from the CarbonLib. If the call is not specific to Carbon but could be handled by both Carbon and InterfaceLib then CarbonLib will pass the call onto InterfaceLib to handle. An example of this would be the Menu Manager. Under Mac OS X, Carbon has its own implementation of the Menu Manager; under Mac OS 8/9, CarbonLib will pass these calls over to InterfaceLib to handle.

By linking to CarbonLib the plug-in will run under both Mac OS X and Mac OS 8/9 without any code changes. For more information on Porting a plugin to Carbon or writing Carbon specific code consult Apple's web site:

https://developer.apple.com/techpubs/macosx/Carbon/carbon.html

For more information about developing Plug-ins for 4th Dimension see:

https://www.4D.com/SDK