Adding CorePlot to iPhone Project - Errors? - iphone

Linker information below
Followed the directions.
Any ideas on how to fix?
Followed directions for install. I'm using Xcode 4.0.
Thanks, J

Did you follow the instructions? Make sure you add -ObjC -all_load -lCorePlot to Other Linker Flags.

Rechecked instructions and dragged CorePlot-CocoaTouch.xcodeproj into project properly. Solved the problem. Hope this helps someone else ;)

You need to include Foundation.framework in your "deleteTest" target. Select it then go to "Build Phases", you will see one of the phases as "Link Binaries and Libraries", expand this and click the + sign in the bottom left of this list. Add the Framework from this list.

There I found a good link for using Core-Plot having detailed explaining how to add it to project & use the delegate method of Core-Plot.
http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application
It worked g8 for me. Hope you would be able to do the same ,yesterday only I did the same thing from here.

Related

Admob Integration

I'm trying to add admob to my app and I'm confused with step 4 which is
Under Other Linker Flags, add -all_load to both Debug and Release.
Is that under OTHER_LDFLAGS? How would I exactly do this? Thanks!
Do this:
1. Go to target seetings of your project.
2. Now go to Build settings. In Search bar type " Other Linker Flags ". As shown below in image will appear on screen.
Now add -all_load to both Debug and Release.
Check this image to set Other Linker flag. hope helps.

CGAffineTransformMakeScale Linker Error

I have this line:
imgView.transform = CGAffineTransformMakeScale(-1, 1);
I want to flip my UIImageView horizontally and tried this line above, however it is giving me a linker error and can't work out the issue.
Can someone please help me fix this or find an alternative way of flipping my UIImageView.
Thanks.
Make sure you are linking against CoreGraphics. In your project, go to Build Phases and look under "Link Binary with Libraries" and check for "CoreGraphics.framework".
If that is not the issue, pls copy/paste the linker error into your question.
Hope that helps.

Simple Question about CGRectIntersectsRect

I just have one simple question. Everytime I use
CGRectIntersectsRect(view1.frame, view2.frame)
I get a linker error stating the linker cannot find the files necessary to compile this method. I do have QuartzCore imported, I'm assuming theres another header I need. Sadly scouring the internet has left me nowhere, and I known this is definetely a simple issue that I keep overlooking. Any answers are appreciated!
Notice: I am using XCode 4 and iOS 5 beta
Import the CoreGraphics framework also. (Not 100% how to think about the distinction between this and QuartzCore, but they are different.)
You want CGRectIntersectsRect, not GCRectIntersectsRect. Make sure you also import the frameworks into your project.
EDIT: Did you add the QuartzCore framework to your project? If not, click on the blue project icon in the top left of Xcode under Run, click on the target, and under the Build Phases tab, select the Link Binary with Libraries option, click on the +, and then add the QuartzCore framework.
Hope that helps!

Undefined symbols for architecture armv6, Updating to iOS 4.3

I am patching upp an application from iOS 4.2 to 4.3 using new xcode4.
With no changes made, except setting iOS to 4.3, I created entitlements and go!
Message I get is:
Undefined symbols for architecture armv6:"function", referenced from:
Ive tried to Clean the project, reinstalling xcode.
I uninstalled also the xcode4 demo version.
I also tried to set to Optimized armv7.
I would be very happy for some help, I'm stuck. Really.
Thanks very much in advance!
Here's how I got this problem:
I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.
My solution for this problem:
Click on the Project icon
Go to the Target in the navigator menu
Click on the "Build Phases" tab
Add the .m file to "Compile Sources" (either drag it across, or use the + button)
Add the .xib or Storyboard file to "Copy bundle resources"
Clean and build
For this type of error, this is what I typically see:
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_MyCustomController", referenced from:
objc-class-ref in SomeOtherController.o
ld: symbol(s) not found for architecture armv6
Almost every time I see this error it is caused by hidden/invisible characters in the import statement in SomeOtherController.h or SomeOtherController.m. So, look at both your .h and .m file, find the line that looks like this:
#import "MyCustomController.h"
Delete this line and retype it (do not copy/paste it -- you'll just repaste the offending hidden character).
Click on your Project name in the navigation window, choose the target you're building against, go to build phases, make sure the one Xcode's telling you that's missing is in there.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Release' option to 'Yes'.
This solved my problem - I hope it helps you, too! :)
I had this problem and I have just solved it.
It was a simple typo in the function name (forgot one letter) that caused the problem in my case.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Debug ' option to 'architecure arm7 arms7s'.
This solved my problem - I hope it helps you, too! :)
I had a similar issue popping-up all suddenly - more specifically, I was getting Undefined symbols for architecture armv6: "_OBJC_CLASS_$_CLLocationManager", referenced from: objc-class-ref in MyCLController.o
Note that I had CoreLocation.framework listed in my frameworks (in xcode' Project left nav, under the Frameworks folder); and had previously geolocation working just fine.
I got rid of the issue by re-installing CoreLocation.framework.
If you're not sure how to do that in xcode:
* click on your project in xcode left nav bar
* Go in the General tab of your project settings
* Navigate down - you'll see the list of frameworks installed under Linked Frameworks and Libraries
* Click on the + icon to add the CoreLocation.framework
In my case, I was doing this in a viewcontroller.m
#import <MediaPlayer/MediaPlayer.h>
Without doing Link Binary With Libraries with MediaPlayer.framework. After adding it, it compiled fine

LibXML2.dylib and Xcode4

I just downloaded Xcode 4 and I cant seem to run my application as the MGTwitter... classes are complaining of a non inclusion error of LibXML2. I have imported it into the frameworks folder, and I have put the following in the header bit in the build settings
$(SDKROOT)/usr/include/libxml2
But I am still getting 65 errors.
Any ideas how to fix this?
Try this:
"$(SDK_DIR)"/usr/include/libxml2
LibXML2 library solved
Many confusion around this issue.
SOLUTION
if you have both Xcode 4.3.x & Xcode 4.5 in /Application folder
must add ONLY: /usr/include/libxml2 in Application TARGET > Header search path.
For this double click on the line, on little window click plus sign and write /usr/include/libxml2
nb - need also add libxml2.dylib to the framework. I use 2.2.7.3
hope help you
Always search user path mark it yes.
Then, remove all previous paths that you have defined manually.
Clean all target.
Analyze or build again.
This works for me.
If you click on "All" and "Combined" go down to the Search Paths section. Make sure you add $(SDK_DIR)/usr/include/libxml2 to the "Header Search Paths" section and not the "Library Search Paths" section.
You need to add also the framework libxml2.dylib
Make User Header Search paths empty and write
$(SDK_DIR)"/usr/include/libxml2
in Header Search paths which is above the Library Search Paths
I think the selected answer is better. However this one worked for me:
I just drag and drop.
I do not know why it works. It's how the old programmer do it. I suppose there should be a framework we can include and that should be fine?
Also other computers may not have file libxml2.dylib in that exact spot and things may go wrong.
Please try this one:
${SDK_DIR}/usr/include/libxml2
Get info on the target and go to the build tab
Add -lxml2 to the Other Linker Flags property
Add -I/usr/include/libxml2 to the Other C Flags property
I also faced this issue for xcode4.6 ,
i added libxml2.dylib
in header search path added :: "/usr/include/libxml2"
and added "AdSupport.framework" and its work for me.
You need to add "$(SDK_DIR)/usr/include/libxml2" in "Release" Category rather then in "Debug" Category under "Header Search Path" if you are putting it into a device.