opensubscriber
   Find in this group all groups
 
Unknown more information…

m : mpw-dev@lists.apple.com 30 November 2005 • 2:09PM -0500

Adding "-ansi strict" to MPW SC causes unresolved symbol error
by mpsuzuki

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi,

Now I'm porting FreeType library to m68k MacOS
(there had ever port for ppc MacOS, but not for m68k),
and found strange behaviour of MPW SC.

Following is a sample source.
------------------------------------------------------
#if defined(__GNUC__) && defined(__APPLE_CC__)
# include <Carbon/Carbon.h>
# include <ApplicationServices/ApplicationServices.h>
#else
# include <ConditionalMacros.h>
# include <Files.h>
#endif

int main()
{
  CInfoPBRec  cipb;

  PBGetCatInfoSync( &cipb );
  return 0;
}
------------------------------------------------------

This is building test only, to call FileManager function.
If I compile it normally, the compiling/linking finishes
normally. But when I add "-strict ansi", I receive following
errors in linking. The name of function PBGetCatInfoSync() is
capitalized and could not resolve it. SC version is 8.9.0d3e1.
In addition, when I tried by MrC, such problem does not occur.

[excuse me, long lines are folded]

------------------------------------------------------
# 2:49:34 PM ----- Build of callPBGetCatInfoSync.exe.
# 2:49:34 PM ----- Analyzing dependencies.
# 2:49:34 PM ----- Executing build commands.
  SC callPBGetCatInfoSync.c -o :callPBGetCatInfoSync.c.o \
    -sym off -model far -ansi strict

  ILink -o callPBGetCatInfoSync.exe \
    ":callPBGetCatInfoSync.c.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:Stubs.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:MathLib.far.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:CLibraries:StdCLib.far.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:MacRuntime.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:IntEnv.far.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:ToolLibs.far.o" \
    "works:MPW:MPW::Interfaces&Libraries:Libraries:Libraries:Interface.o" \
    -sym off -mf -d -t 'MPST' -c 'MPS ' -model far -state rewrite \
    -compact -pad 0
# Undefined entry, name: "PBGETCATINFOSYNC"
# Referenced from "main" in file "callPBGetCatInfoSync.c.o"
#
------------------------------------------------------

Due to SC uses some undocumented(?) reserved keywords,
now I add "-ansi strict" option to compile FreeType sources.
I could not find explicit notes about such issue in "Help SC",
but there's no problem in building by MrC, I suppose it is
SC's bug. If I'm misunderstanding, please let me know.
And, mixing objects compiled with "-ansi strict" and without
it causes problem?


Regards,
mpsuzuki
_______________________________________________
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.