If you want to use core plot 0.9 framework in a iOS project with arc, you will have problems!
Also if you are using iOS 6 and you have an old build of CorePlot you will get an error message like:
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/.../CorePlot/libCorePlot-CocoaTouch.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Many errors and incompatibilities. You can’t edit the code manually but someone else did it for you.
You have to download the latest core plot version which is available only using Mercurial Source Code control system.
1. Download Mercurial from here.
2. Install it.
3. Open Terminal and run the following command:
hg clone https://core-plot.googlecode.com/hg/ core-plot
You will get an output like:
requesting all changes
adding change sets
adding manifests
adding file changes
added 406 changesets with 3444 changes to 1861 files
updating working directory
1018 files updated, 0 files merged, 0 files removed, 0 files unresolved
Just wait..
4. If it finished successfully, you will find a new folder in
/Users/User-Name/core-plot/
with the latest version.
5. Now, it’s time to build the binaries. In order to succeed it you have to create the release package.
So change to scripts folder
6. Run the create release script by typing:
python createrelease.py <version>
7. The release products were placed in a folder called CorePlot_<version> and located on your desktop.
8. Use the binaries following this post and your project will use core plot in arc environment.
Hi,
the script failed with this messages:
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m: In function ‘-[CPTCalendarFormatter stringForObjectValue:]’:
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:190: error: ‘NSWeekOfMonthCalendarUnit’ undeclared (first use in this function)
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:190: error: (Each undeclared identifier is reported only once
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:190: error: for each function it appears in.)
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:192: error: request for member ‘weekOfMonth’ in something not a structure or union
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:199: error: ‘NSWeekOfYearCalendarUnit’ undeclared (first use in this function)
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:201: error: request for member ‘weekOfYear’ in something not a structure or union
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:208: error: ‘NSYearForWeekOfYearCalendarUnit’ undeclared (first use in this function)
/Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m:210: error: request for member ‘yearForWeekOfYear’ in something not a structure or union
** BUILD FAILED **
The following build commands failed:
CorePlot-CocoaTouch:
CompileC ../build/CorePlot-CocoaTouch.build/Release-iphoneos/CorePlot-CocoaTouch.build/Objects-normal/armv6/CPTCalendarFormatter.o /Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m normal armv6 objective-c com.apple.compilers.gcc.4_2
CompileC ../build/CorePlot-CocoaTouch.build/Release-iphoneos/CorePlot-CocoaTouch.build/Objects-normal/armv7/CPTCalendarFormatter.o /Users/suser/core-plot/framework/Source/CPTCalendarFormatter.m normal armv7 objective-c com.apple.compilers.gcc.4_2
(2 failures)
Error: xcodebuild failed
** BUILD FAILED **
The following build commands failed:
Universal Library:
PhaseScriptExecution “Run Script” “/Users/suser/core-plot/framework/../build/CorePlot-CocoaTouch.build/Release-iphoneos/Universal Library.build/Script-0799D97F137318D80026072C.sh”
(1 failure)
Traceback (most recent call last):
File “createrelease.py”, line 71, in
copy(iOSLibFile, iosDir)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 116, in copy
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 81, in copyfile
IOError: [Errno 2] No such file or directory: ‘/Users/suser/core-plot/build/Release-universal/libCorePlot-CocoaTouch.a’
I’ve followed again these steps in order to create the release packet for CorePlot 1.0 and is working fine.
Please try it again 🙂
Thanks for your attention… I will retry again asap and let you know the results…
Bye
I get the same error!
** BUILD SUCCEEDED **
Traceback (most recent call last):
File “createrelease.py”, line 71, in
copy(iOSLibFile, iosDir)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 116, in copy
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 81, in copyfile
IOError: [Errno 2] No such file or directory: ‘/Users/Tom/core-plot/build/Release-universal/libCorePlot-CocoaTouch.a’
I tried it on two different Mac both with Mountain Lion.
This is an error message from python script.
Check the folders names and the slashes, that is what I discovered looking to python forums (although I don’t know python).
Soon, I will do the procedure again in case that I miss something to write and probably discover the point that make this procedure working in my system.
Thanks for looking at the problem. Despite the message ** BUILD SUCCEEDED ** the directory “build” is empty. That is the python script cannot find “libCorePlot-CocoaTouch.a”. I believe the error message is obvious but it is not obvious that although “BUILD SUCCEEDS” there is no library.
Thank you for positing this! This worked for me. It’s been years and the available knowledge on how to install and implement CorePlot has gotten no less arcane.