opensubscriber
   Find in this group all groups
 
Unknown more information…

m : mpw-dev@lists.apple.com 1 December 2005 • 9:45AM -0500

Re: [mpw-dev] Re: Adding "-ansi strict" to MPW SC causes unresolved symbol error
by Greg Branche

REPLY TO AUTHOR
 
REPLY TO GROUP




>Yes! In fact, when I compile without "-ansi strict",
>the object file refers _HFSDispatch() instead of
>PBGETCATINFOSYNC() (I've checked that by DumpObj),
>as you shown. But when I compile with "-ansi strict",
>the problem occurs. Did you compiled with "-ansi strict"?

I probably didn't, but I have now, and I see the "problem". This is actually expected behavior. '-ansi strict' disallows any Apple extensions to the ANSI standard that are used throughout the toolbox interfaces. So, inline constructs such as the ones used for the File Manager calls are ignored, and you end up with direct function references to functions that don't actually exist in the libraries.

To allow the Apple extensions to work as you'd expect, but still force the compiler to complain about other non-ANSI constructs, use '-ansi on' instead of '-ansi strict'.

This is explained in the SC reference documentation, found at <ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./Documentation/MPW_Reference/SC_SCpp_Reference.sit.hqx>. See pages 1-4 through 1-9.


--
Greg Branche
MPW Entomologist
_______________________________________________
Do not post admin requests to the list. They will be ignored.
MPW-Dev mailing list      (MPW-Dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mpw-dev/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.