Undefined symbols for architecture i386: "_OBJC_CLASS_$...

3,079 views
Skip to first unread message

Joachim

unread,
Jul 17, 2011, 10:12:15 AM7/17/11
to coreplot-discuss
Hi,

In my iOS project I had CP 0.3 working.
Working on MacBookPro8,2 , osx 10.6.8 , XC 4.0.2

Since I upgraded to CPT 0.4 :
I updated al classes to CPT,
tried with different compilers,
cleaned and fresh builds,
linked flags are still in place : -ObjC -all_load

I get following messages :

Ld /Users/joachim/Library/Developer/Xcode/DerivedData/myProxiData-
cwttfjqhtgheaobtfdmdawwndchd/Build/Products/Debug-iphonesimulator/
myProxiData.app/myProxiData normal i386
cd /Users/joachim/Xcode/myProxiData
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/
Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
gcc-4.2 -arch i386 -isysroot /Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/
Users/joachim/Library/Developer/Xcode/DerivedData/myProxiData-
cwttfjqhtgheaobtfdmdawwndchd/Build/Products/Debug-iphonesimulator -L/
Users/joachim/Xcode/myProxiData -L/Users/joachim/Xcode/myProxiData/
githubs/core-plot -F/Users/joachim/Library/Developer/Xcode/DerivedData/
myProxiData-cwttfjqhtgheaobtfdmdawwndchd/Build/Products/Debug-
iphonesimulator -filelist /Users/joachim/Library/Developer/Xcode/
DerivedData/myProxiData-cwttfjqhtgheaobtfdmdawwndchd/Build/
Intermediates/myProxiData.build/Debug-iphonesimulator/
myProxiData.build/Objects-normal/i386/myProxiData.LinkFileList -
mmacosx-version-min=10.6 -dead_strip -lxml2 -ObjC -all_load -Xlinker -
objc_abi_version -Xlinker 2 -lCorePlot-CocoaTouch -framework
QuartzCore -framework CoreData -framework CoreGraphics -framework
CFNetwork -framework MobileCoreServices -lxml2.2 -lz -framework
SystemConfiguration -framework Foundation -framework UIKit -framework
MessageUI -o /Users/joachim/Library/Developer/Xcode/DerivedData/
myProxiData-cwttfjqhtgheaobtfdmdawwndchd/Build/Products/Debug-
iphonesimulator/myProxiData.app/myProxiData

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CPTGradient", referenced from:
objc-class-ref in MainViewController.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in CPTClearTheme.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in MainViewController.o
objc-class-ref in CPTClearTheme.o
"_OBJC_METACLASS_$_CPTXYTheme", referenced from:
_OBJC_METACLASS_$_CPTClearTheme in CPTClearTheme.o
"_CPTDecimalFromDouble", referenced from:
-[CPTClearTheme applyThemeToAxisSet:] in CPTClearTheme.o
"_CPTDecimalFromString", referenced from:
-[MainViewController createGraph] in MainViewController.o
"_OBJC_CLASS_$_CPTScatterPlot", referenced from:
objc-class-ref in MainViewController.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in MainViewController.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in MainViewController.o
objc-class-ref in CPTClearTheme.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in MainViewController.o
"_CPTDecimalFromFloat", referenced from:
-[MainViewController createGraph] in MainViewController.o
"_OBJC_CLASS_$_CPTXYTheme", referenced from:
_OBJC_CLASS_$_CPTClearTheme in CPTClearTheme.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in MainViewController.o
objc-class-ref in CPTClearTheme.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

I don't know what I'm missing here.
Can you help me in the right direction to solve this.

Tnx,

Joachim

sas

unread,
Jul 17, 2011, 2:40:06 PM7/17/11
to coreplot-discuss
I think that's similar to the issue "Karl" was reporting in the
"Release 0.4 available" thread. See my suggestion about building the
lib vs using the binary there (assuming you were using the shipped
binary). That did the trick for me.

-sas

Eric

unread,
Jul 17, 2011, 2:43:17 PM7/17/11
to coreplot-discuss
Were you using the SDK under 0.3? If so, that's no longer supported.
You need to switch over to the static library or dependent project
method.

Eric

Joachim

unread,
Jul 17, 2011, 3:47:58 PM7/17/11
to coreplot-discuss
it's similar, but the solution is not mentioned.
For what i see.

Joachim

unread,
Jul 17, 2011, 3:58:17 PM7/17/11
to coreplot-discuss
I removed the sdk with the move to CP 0.3 - static library

Now I deleted the header files and static library from my project
Added the new ones CPT 0.4.

Joachim

Joachim

unread,
Jul 19, 2011, 3:39:10 PM7/19/11
to coreplot-discuss

I still get those messages after the steps mentioned before.

Can anyone point me in a direction where to look how to solve this?

tnx,

Joachim

Eric

unread,
Jul 19, 2011, 8:17:50 PM7/19/11
to coreplot-discuss
{Xcode 4}

Select your project in the Project Navigator and click on the target.
Check the "Link Binaries With Libraries" list on the "Build Phases"
tab. Make sure "libCorePlot-CocoaTouch.a" is in the list and is set to
"Required".

Eric

Joachim

unread,
Jul 20, 2011, 2:36:34 PM7/20/11
to coreplot-discuss
Tnx,
but no success.

I'm working in Xcode 4,
libCorePlot-CocoaTouch.a is in the "Link Binaries With Libraries" with
the required tag.
and i also checked that it is 0.4 one ( created on 8 juli).

Still got the messages.

Joachim

Drew McCormack

unread,
Jul 20, 2011, 2:41:28 PM7/20/11
to coreplot...@googlegroups.com
You need to make sure there is really no sdk still hiding somewhere. That will link otherwise.

Drew

The Mental Faculty

> --
> You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
> To post to this group, send email to coreplot...@googlegroups.com.
> To unsubscribe from this group, send email to coreplot-discu...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/coreplot-discuss?hl=en.
>

Joachim

unread,
Jul 21, 2011, 4:57:05 AM7/21/11
to coreplot-discuss
I know I removed the sdk from my drive when I switched to the static
library with version 0.3.
And I will test tonight on a clean Lion install.
No sdk or whatever installed.
I will let you know

tnx

Joachim

On Jul 20, 8:41 pm, Drew McCormack <drewmccorm...@mac.com> wrote:
> You need to make sure there is really no sdk still hiding somewhere. That will link otherwise.
>
> Drew
>
> The Mental Faculty
>

Joachim

unread,
Jul 21, 2011, 4:57:14 PM7/21/11
to coreplot-discuss
On the fresh Lion, I compile the project successfully.
No errors anymore.

Good that the errors are gone,
pity is that we still don't know why ( or I don't know )

thanks for all your help

Joachim

Claudio Bisegni

unread,
Jul 27, 2011, 4:30:48 PM7/27/11
to coreplot-discuss
I also have this issue, when i link the library i get only two symbol
found but other 13 has not been found and i got this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_CPTGradient", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_CPTDecimalFromDouble", referenced from:
-[GPSGraphDataSource updatePlotRage] in GPSGraphDataSource.o
"_kCPTStocksTheme", referenced from:
-[GPSGraphDataSource initWithView:] in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTScatterPlot", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTTheme", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTXYPlotSpace", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTXYAxis", referenced from:
objc-class-ref in GPSGraphDataSource.o
"_CPTDecimalFromFloat", referenced from:
-[GPSGraphDataSource initWithView:] in GPSGraphDataSource.o
-[GPSGraphDataSource updatePlotRage] in GPSGraphDataSource.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in GPSGraphDataSource.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status


gcalikpl

unread,
Jul 29, 2011, 7:03:30 AM7/29/11
to coreplot-discuss
Has anybody have solution on this problem ??

Drew McCormack

unread,
Jul 29, 2011, 11:24:39 AM7/29/11
to coreplot...@googlegroups.com
Did you include -ObjC and -all_load in your link flags?

Drew


On 29/07/2011, at 1:03 PM, gcalikpl wrote:

> Has anybody have solution on this problem ??
>

Reply all
Reply to author
Forward
0 new messages