Coreplot for implementing barchart - core-plot

Am implementing barchart using coreplot...am getting the errors bellow which am unable to debug. Can anybody please help me out with the solution for this..Tried all ways but still couldn find the solution.
Ld /Users/MacMini/Library/Developer/Xcode/DerivedData/DashBoard-cmeoxsnbrnrzrkcwmgmfxqlfuzvo/Build/Products/Debug-iphonesimulator/DashBoard.app/DashBoard normal i386
cd /Users/MacMini/Desktop/DashBoard
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/MacMini/Library/Developer/Xcode/DerivedData/DashBoard-cmeoxsnbrnrzrkcwmgmfxqlfuzvo/Build/Products/Debug-iphonesimulator -L/Users/MacMini/Desktop/DashBoard -F/Users/MacMini/Library/Developer/Xcode/DerivedData/DashBoard-cmeoxsnbrnrzrkcwmgmfxqlfuzvo/Build/Products/Debug-iphonesimulator -F/Users/MacMini/Desktop/DashBoard -filelist /Users/MacMini/Library/Developer/Xcode/DerivedData/DashBoard-cmeoxsnbrnrzrkcwmgmfxqlfuzvo/Build/Intermediates/DashBoard.build/Debug-iphonesimulator/DashBoard.build/Objects-normal/i386/DashBoard.LinkFileList -mmacosx-version-min=10.6 -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 -framework QuartzCore -lCorePlot-CocoaTouch -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/MacMini/Library/Developer/Xcode/DerivedData/DashBoard-cmeoxsnbrnrzrkcwmgmfxqlfuzvo/Build/Products/Debug-iphonesimulator/DashBoard.app/DashBoard
Undefined symbols for architecture i386:
"_CPTDecimalFromDouble", referenced from:
-[Barchart viewDidLoad] in Barchart.o
"_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
objc-class-ref in Barchart.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in Barchart.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in Barchart.o
"_OBJC_CLASS_$_CPTBarPlot", referenced from:
objc-class-ref in Barchart.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This page (in the comments section) may help you with that: http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications
And this is a previous Stack Overflow question that looks like yours:
Using Core Plot iPhone - Linker error
Here are some fixes I found on the pages above:
In CorePlot-CocoaTouch project settings, change iOS Deployment Target to 3.2
change Build Active Architecture Only to No for all configurations
change C/C++ Compiler Version from GCC 4.2 to LLVM GCC 4.2
Reinstall Core-Plot after downloading its latest stable version

Related

Trouble compiling libnet 1.1.7 for iOS7

I'm trying to use libnet 1.1.7 in iOS project and i'm getting some errors:
Ld /Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Products/Debug-iphonesimulator/net_tools.app/net_tools normal i386
cd /Users/admin/Desktop/net_tools
setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
setenv PATH "/Applications/Разработка/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Разработка/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Разработка/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Разработка/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Products/Debug-iphonesimulator -L/usr/local/lib -F/Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Products/Debug-iphonesimulator -filelist /Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Intermediates/net_tools.build/Debug-iphonesimulator/net_tools.build/Objects-normal/i386/net_tools.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -lnet -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Intermediates/net_tools.build/Debug-iphonesimulator/net_tools.build/Objects-normal/i386/net_tools_dependency_info.dat -o /Users/admin/Library/Developer/Xcode/DerivedData/net_tools-gnkjrfjgtxkpesepyzzpunpfdwkx/Build/Products/Debug-
ld: warning: ignoring file /usr/local/lib/libnet.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libnet.dylib
Undefined symbols for architecture i386:
"_libnet_addr2name4", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
"_libnet_addr2name6_r", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
"_libnet_destroy", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
"_libnet_init", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
"_libnet_name2addr4", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
"_libnet_name2addr6", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is my simple code in AppDelegate.m:
#import "AppDelegate.h"
#import <libnet.h>
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
libnet_t *lnet;
char errbuf[LIBNET_ERRBUF_SIZE];
u_int32_t addr;
struct libnet_in6_addr addr6;
char ipv6addr[64];
char addr_str[] = "www.google.com";
lnet = libnet_init(LIBNET_RAW4, NULL, errbuf);
if ( lnet == NULL ) {
NSLog(#"libnet_init() failed: %s", errbuf);
exit(EXIT_FAILURE);
}
//IPv4
addr = libnet_name2addr4(lnet, addr_str, LIBNET_RESOLVE);
NSLog(#"%s",libnet_addr2name4(addr, LIBNET_DONT_RESOLVE));
//IPv6
addr6 = libnet_name2addr6(lnet, addr_str, LIBNET_RESOLVE);
libnet_addr2name6_r(addr6, LIBNET_DONT_RESOLVE, ipv6addr,
sizeof(ipv6addr));
NSLog(#"%s",ipv6addr);
libnet_destroy(lnet);
return YES;
}
#end
Can anyone please explain the error to me in detail, and how to rectify it? Any help would be much appreciated.
P.S. I use Xcode 5.0.1 on Mavericks (v10.9.4)
UPD. I'v rebuild libnet for i386 arch from source and i'v got only one error:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/usr/local/lib/libnet.dylib' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think there's a problem with compile libnet from source for iOS. How do it correctly?
Get libnet 1.1.7
Open a terminal window and go to libnet folder, next we need to compile libnet for iOS7 emulator:
export CC=clang
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH"
export CFLAGS="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -mios-simulator-version-min=7.0"
./configure
make
sudo make install
Begin by selecting the project in Xcode. Select Target and then select Build Settings. Scroll down in the Build Settings until you get to the Linking section. Under the Other Linker Flags option, add -lnet. Now scroll down until you reach the Search Paths section and add /usr/local/lib to Library Search Paths. Finally, add /usr/local/include to the header's search path.

Compile error with UrbanAirpush about some files missing

I got this error when compiling my code:
Ld /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator/BusinessIdea.app/BusinessIdea normal i386
cd /Users/owner12/Desktop/BusinessIdea
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator -L/Users/owner12/Desktop/BusinessIdea/BusinessIdea/Airship -F/Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator -filelist /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Intermediates/BusinessIdea.build/Debug-iphonesimulator/BusinessIdea.build/Objects-normal/i386/BusinessIdea.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework UIKit -framework Foundation -framework CoreGraphics -lUAirship-1.4.0 -lUAirshipFull-1.4.0 -o /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator/BusinessIdea.app/BusinessIdea
Undefined symbols for architecture i386:
"_AudioServicesCreateSystemSoundID", referenced from:
-[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
-[UAPushSettingsSoundsViewController tableView:didSelectRowAtIndexPath:] in UAPushSettingsSoundsViewController.o
"_AudioServicesPlayAlertSound", referenced from:
-[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
-[UAPushSettingsSoundsViewController tableView:didSelectRowAtIndexPath:] in UAPushSettingsSoundsViewController.o
"_AudioServicesPlaySystemSound", referenced from:
-[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
"_CFHTTPAuthenticationCopyMethod", referenced from:
-[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
-[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
"_CFHTTPAuthenticationCopyRealm", referenced from:
-[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
-[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
"_CFHTTPAuthenticationCreateFromResponse", referenced from:
-[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
-[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
They are very cryptic and googling the whole error does not bring up much. Would anyone know why this happens and how to resolve this?
Thanks!
You have to add the following frameworks to your project. AudioServices, CFNetwork, SystemConfiguration, MobileCoreServices, zlib, and libxml2. For libxml2 and zlib, you have to add 2 entries to Header Search Paths in your build settings. /usr/include/ and /usr/include/libxml2/.
To add them (they are already included in Xcode), do this
Click the plus button, and add all the frameworks I listed above. (Cocoa.framework is not required, that's just from my project). This is located in your projects summary if you scroll down.

Issues in using address book framework of IOS

I am trying to use address framework in my project. I have linked the frameworks AddressBookUI.framework and AddressBook.framework in my project. But still i am getting the below error while building the app.
Help me to figure out the issue please.
Ld "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts" normal i386
cd "/Users/sathishkumar/projects/Easy Contacts"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -F/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -filelist "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Intermediates/Easy Contacts.build/Debug-iphonesimulator/Easy Contacts.build/Objects-normal/i386/Easy Contacts.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts"
Undefined symbols for architecture i386:
"_ABRecordCopyValue", referenced from:
-[ViewController displayPerson:] in ViewController.o
"_ABMultiValueGetCount", referenced from:
-[ViewController displayPerson:] in ViewController.o
"_ABMultiValueCopyValueAtIndex", referenced from:
-[ViewController displayPerson:] in ViewController.o
"_OBJC_CLASS_$_ABPeoplePickerNavigationController", referenced from:
objc-class-ref in ViewController.o
"_kABPersonFirstNameProperty", referenced from:
-[ViewController displayPerson:] in ViewController.o
"_kABPersonPhoneProperty", referenced from:
-[ViewController displayPerson:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add <AddressBook/AddressBook.h> to the file, AddressBookUI is just that address book UI.
Did you import those frameworks into your .h files?

Json in iOS5 showing error

"_OBJC_CLASS_$_SBJSON", referenced from:
Objc-class-ref in JparseViewController.o
Symbol(s) not found for architecture i386
Clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/mag1/Library/Developer/Xcode/DerivedData/Jparse-heknsvlbknssribatbwgkuefjoja/Build/Products/Debug-iphonesimulator/Jparse.app/Jparse_armv7 armv7 i386
cd "/Users/mag1/Documents/Xcode Projects/Jparse"
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/mag1/Library/Developer/Xcode/DerivedData/Jparse-heknsvlbknssribatbwgkuefjoja/Build/Products/Debug-iphonesimulator -F/Users/mag1/Library/Developer/Xcode/DerivedData/Jparse-heknsvlbknssribatbwgkuefjoja/Build/Products/Debug-iphonesimulator -filelist /Users/mag1/Library/Developer/Xcode/DerivedData/Jparse-heknsvlbknssribatbwgkuefjoja/Build/Intermediates/Jparse.build/Debug-iphonesimulator/Jparse.build/Objects-armv7/i386/Jparse.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/mag1/Library/Developer/Xcode/DerivedData/Jparse-heknsvlbknssribatbwgkuefjoja/Build/Products/Debug-iphonesimulator/Jparse.app/Jparse_armv7
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SBJSON", referenced from:
objc-class-ref in JparseViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I got JSON framework files from downloaded example. The examples are working perfectly, but my project showing above errors.
Symbol(s) not found for architecture i386
The above error occurs in the following situation:
You were trying to run your application in the iPhone/iPad Simulator
The library was only built to run on the physical devices, and does not support being run in the Simulator.
To resolve this, you either need to add i386 to the Valid Architectures of the SBJSON library build target, or test your application using a physical device.
You didn't add the SBJSON.m file to your target. Check the properties panel for this file, and there should be a checkbox indicating which target it is assigned to. You may have simply forgotten to copy SBJSON.m into your project at all.
go to Projectapp -> Buildphases -> compileSources
here to add all .m files of JSON with + icon. problem will be resolved

linking error Ipad

Hi am having this error when I am trying to compile my application. Can any one please let me what this error is?
Thanks
Ld /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator/Graph_Theory.app/Graph_Theory normal i386
cd "/Users/DineshParchuri/Desktop/3:28:11/Graph_Theory"
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/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator -F/Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator -filelist /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Intermediates/Graph_Theory.build/Debug-iphonesimulator/Graph_Theory.build/Objects-normal/i386/Graph_Theory.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator/Graph_Theory.app/Graph_Theory
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyTableCell", referenced from:
objc-class-ref in Graph_TheoryViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
The error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyTableCell", referenced from:
objc-class-ref in Graph_TheoryViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
specifies that an Objective-C class named MyTableCell is not (completely) defined and a call to this undefined class is made in Graph_TheoryViewController.m
Check the Graph_TheoryViewController.m file and see if you implemented MyTableCell if you have (I assume) class with that name defined in one of the included headers.
If this class is declared elsewhere, you may be missing method implementations in the appropriate .m file (most likely MyTableCell.m)
This very same error drove me to the brink of insanity when I tried to include GData XML into one of my apps. The cause of the problem was that I included GDataXMLNode.h in my apps pch file - see my SO question.
If you're trying the same (using GData XML) this might be your solution, too. If not, try commenting out stuff in your pch file anyway - to be honest, I still don't know the exact logic behind this error, any explanations welcome...

Resources