CGAffineTransformMakeScale Linker Error - iphone

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.

Related

Symbols not found for architecture i386?

basically I've added the EGOTableViewPullRefresh files into my project. The code that I've written should work. However, 2 errors come up when that is triggered by the code in the viewDidLoad.
The Error looks like this:
What seems to be the problem and how can I fix it?
Thanks.
Make sure you are importing the correct headers and that the implementation files are linked to your Target.
let me tell you ,first enter project->build phases, now ,you can find the dir of Compling sources
,enter into it ,you can't find the EGOREF......m,now add the .m into it ,build and run !

Adding CorePlot to iPhone Project - Errors?

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.

is there a panorama lib to use for ipad?

recently I've been given a project which need to display a spherical panorama view. Normally on iphone i've been using panoramaGL for some time but for ipad, i dont have any luck to use it any more.
I can compile the lib with some minor warnings. but when i try to link the lib to my real project, it just keep telling me that PLTexture is not there. it says
Undefined symbols:
"_OBJC_CLASS_$_PLTexture", referenced from:
objc-class-ref-to-PLTexture in panoTestViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Please anybody can help me out of this?
I had the same problem, and noticed that although I included PanoramaGL xcode project, its lib (libPanoramaGL.a) was not selected to build with the target (that little checkbox in the top right list of XCode).
Once I selected the checkbox, the problem went away, but the bulider was stuck on a similar error with PLResources as the current trouble maker. But this might be only my problem, cause I went to the PanoramaGL project, and noticed that PLResources.c and .h were not included in the project.
Once I included them and rebuilt everything - the build succeeded.
Hope this helps,
Oded.

Problem with finding leak code

I am using xcode 3.2 and I have leaks in my app but how can I find the line in my code which is leaking?? In earlier version of xcode I just used to double click on the object in the instrument which used to show the xcode with pointing the line with the leak. But in the 3.2 version I am not able to do that.
Please anyone tell me how to find the line where memory is leaking?
Any help would be appreciated.
You're probably working on 10.6, then you can use the extremely cool Build & Analyze feature (shift+cmd+a or in the menu Build->Build & Analyze).
In addition to my comments on your question, you might also find this helpeful (it was top link on the "Related" list on the right hand side of this page):
Instruments Leaks - Not showing my source code

gcc-4.2 failed with exit code 1 iphone

I've seen this error with different variations on discussion forums but being a non programmer I'm not sure how to progress this.
Basically I have code which I found to help me with changing the background colors of cells on a grouped uitableview. The code introduced a line as such:
CGContextAddArcToPoint(c, minx, miny, midx, miny, ROUND_SIZE);
This gave an error indicated that it wasn't declared, so I added to my .h file the following under import uikit:
#import <UIKit/UIKit.h>
#define ROUND_SIZE 10
Now it shows that I have an error:
Command/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 iphone
Some discussions talk about libraries but because I don't have a programming background I don't understand what to do. I also see that some people show a log output but I'm not sure where that comes from as I don't get any debug windows because I'm guessing it doesn't get that far. I simply click 'Build and Go' and I get this error in the Message window.
Any thoughts?
As you can see from the many different responses this error is caused by many different problems. Luckily, I have found the Meta Solution!
In xcode, right click the error line and choose "Open These Latest Results as Transcript Text File". This will open the real xcode output log, which should contain a better description of the error then was previously seen.
-Evan
I have gone through that same problem. There may be some file which has no refference . You can see that type of file in red letter. Remove that file.
You probably don't have the CoreGraphics.framework added to your frameworks list.
To make sure, click the "Frameworks" folder on Xcode. If the framework isn't listed on the table to the right, you'll need to add it by right-clicking the Frameworks folder, chooseing "Add Existing Framework..." and then choosing it from the list.
I've found the problem after seeing the Build Results window that Dave mentioned (thank you!!!). I had a different version of the same .h and .m file because I was testing with different code. I deleted the unnecessary files as it was seeing something in there as a duplicate.
The build was successful.
Thank you!
You can see the error message output from GCC by selecting "Build Results" from the "Build" menu or by pressing ⇧⌘B.
you have defined the same static constants!!!!
static NSString *kSectionTitleKey = #"sectionTitleKey";
static NSString *kSectionTitleKey = #"sectionTitleKey";
the problem is
nothing about the CoreGraphics.framework
Evans answer is the best thing you can do to find the exact reason of why you are having that error. In most cases, in my experience, is that there have been files that have been deleted but haven't been removed from the project.
This type of exit code error occures due to Any of your framework or Library overlap. so solve this problem check your error log and find out duplicate object symbols waring in log than you got actual file which is overlap in code.
Another fix to this problem that was the answer to my fix was that I had two classes with the same name. A webservices helper had created an Invoice class, and when I tried to add a file with that same name it didn't have any problems until I tried to compile.
So make sure all your classes have unique names :)
xcode build errors:
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′
Solution:
This can be caused by importing a project for a pre- iOS 5 SDK into a copy of xcode with iOS 5 SDK only.
To fix,
click your Project -> Build Settings. Then under Build Options, there is an entry for Compiler for C/C++/Objective-C. Choose Apple LLVM compiler 3.0.
When u create a file , u have to disable [uncheck] cocos2d libraries & then add the file. so that gcc-4.2 error will be rectified :) checkout!!!
This problem also arises when you rename the XIB file. You have to replace the old name with the new name in the xib files as well as in the navigation controller (if used).
For me, I found the solution above helpful....
"Open These Latest Results as Transcript Text File" which explained it couldn't find libGDataTouchStaticLib.a. I then had to build the static library for Gdata.xcodeproj (changing the active target > GdataTouchStaticLib) then had to manually add this file by dragging it to the targets > MYAPPNAME > Link Binary With Libraries. Build & Run.. All Good.
This issue could be because some libraries might be missing. Right click on the error line and click on "Open these results as transcript text files" and check the missing library.
I had the same problem, noticed that it was looking for a file in the wrong folder, essentially, don't store projects in folders with apostrophes in their name!
I had the same problem. The reason was, I had two int main(int argc, char *argv[]) functions.
I've gotten the same error and solved in a very strange way. Cleaning and rebuilding the project doesn't solve it but simply adding an empty line in ApplicationViewController.mm has forced the compiler to rebuild "something" and the error has gone by itself.
I just add that the same project compiles without error on iMac and failed on macBook.
I was getting this error on building a cocos2d project using xcode 4.3 on Lion. To fix this error, I followed the instructions here: http://www.mac.ph/cocos2d-templates-and-xcode-43
Here is one of the possible solutions:
Remove the .m(implementation) file import statement from the viewController class if it is included along with related .h(header) file.
Instead of including (by mistake)
#include "myClass.h"
#include "myClass.m"
Include only the required header file as:
#include "myClass.h"
Thanks,
Prodeveloper