discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep + Xcode


From: Wolfgang Lux
Subject: Re: GNUstep + Xcode
Date: Sun, 27 Apr 2008 17:58:46 +0200

Joseph Toscano wrote:
Ld /Users/zhaytee/Projects/NSBang/Xcode/build/Debug/NSBang normal i386
    cd /Users/zhaytee/Projects/NSBang/Xcode
/Developer/usr/bin/gcc-4.0 -o /Users/zhaytee/Projects/NSBang/ Xcode/build/Debug/NSBang -L/Users/zhaytee/Projects/NSBang/Xcode/ build/Debug -F/Users/zhaytee/Projects/NSBang/Xcode/build/Debug -F/ opt/local/GNUstep/Local/Library/Frameworks -filelist /Users/zhaytee/ Projects/NSBang/Xcode/build/NSBang.build/Debug/NSBang.build/Objects- normal/i386/NSBang.LinkFileList -framework Foundation -framework netclasses -arch i386
Undefined symbols:
  ".objc_class_name_IRCObject", referenced from:
      .objc_class_name_NSBangIRCInterface in NSBangIRCInterface.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I would expect gcc/ld to complain loudly about the non-presence of the
"netclasses" framework, if it were unable to find same.


Here's an excerpt from the output of nm:

netclasses(single module):
00008ca4 t +[IRCObject initialize]
00000f28 t +[NSFramework_netclasses frameworkClasses]
00000efe t +[NSFramework_netclasses frameworkEnv]
00000f08 t +[NSFramework_netclasses frameworkPath]
...
00012fe0 S ___objc_class_name_IRCObject
...

So, clearly the IRCObject class is tucked away in there. Why can't ld see it when I compile my Xcode project, though? I'm rather stumped on this one.

Apparently, you are trying to link code which is compiled for different
Objective-C runtimes, namely the Apple runtime (Foundation) and the GNU
runtime (netclasses). You should either recompile netclasses for the
Apple runtime (i.e., not with GNUstep) or set up Xcode such that it
invokes the Objective-C compiler with -fgnu-runtime. You'll also have to
set up include and link paths to GNUstep of course. And don't forget to
pass -fconstant-string-class=NSConstantString to the compiler.

Wolfgang






reply via email to

[Prev in Thread] Current Thread [Next in Thread]