iPhone sdk compiler warning Directory help needed -L not found - iphone

I have a nuisance problem. I have upgraded sdk's and along the way, I must have previously used the 3.1.3 simulator, which I no longer have. I have not found where and how to delete the reference, so I can get rid of the warning
Directory '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib' following -L not found
Thanks

In Project menu Edit Project Settings under base sdk change value to 4.2

Related

Xcode upgrade: PBXContainerItemProxy missing containerPortal key

I just upgraded my Xcode, now when I try to open my project, I get this error:
Project /Users/xxx/xxxx/xxxxx/xxxxxx/xxxxxxxx.xcodeproj cannot be opened: PBXContainerItemProxy (xxxxxxxxxxxxxxxxx) is missing a containerPortal key
I have searched the web and stackoverflow, but cannot get anything relevent to come up at all regarding this.
I do have Three20 as part of my project, I don't know if that matters. I just upgraded to xcode 4.4.1
Thanks for any insight.
-D
the project icon which we see i.e projectname.xcodeproj, is actually a directory, you do this
1. in terminal do cd yourproject.xcodeproj
2.ls
3.vi project.pbxproj
4. scroll down till /* Begin PBXContainerItemProxy section */
5.there you will see all sections check for the section which is missing a portal key edit it and save it :wq it will work
in image if you see the first section is missing container portal key.just pic it from other section and replace it..
it will work :D see this link
Now I should start with that I do not know the actual error, never seen it before, but I did find a reference to a "PBXContainerProxy"-error in this post (As soon as I add a project to XCode 4.0.2 it crashes) and thought you might try the solutions from there?
"Apparently this is due to the new version of XCodeProjects. I found a
work around by pre-compiling the library that was causing the issue
and then using the linker to link to the .a file. I also had to copy
the .a library into the DerivedData path.
The real solution was to remove the project and replace it with an
updated project for the new version of XCode."
Hope that helps somewhat :)
Never saw that error either, but if you're upgrading directly from XCode 3.X I'd suggest you to go to https://developer.apple.com/downloads/index.action?name=Xcode
and download/install a previous version of Xcode somewhere else. (You can have several different copies installed on your machine, just google it if you don't know how but just remember to use xcode-select to pick the one you want to use). Repeat with all the versions back to 4.0.1 until (hopefully) it works. I know it's tedious but it might help.
If it does, validate the project settings and try to open it with 4.4.1. That should work.
Good luck

Issue with iphone sdk 4.2.1

Probably a silly question. When running my project on the Device in the debug mode I get a lot of warnings al having the following string:
warning: Unable to read symbols for
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1
(8C148a)/Symbols/System/Library/PrivateFrameworks/
I think its due to the space between "4.2.1" and "(8C148a)". How can i get rid of it? It must be a setting somewhere in Xcode.
I dont have these warnings on the simulator.
thanks in advance, Christian
I was getting:
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).
Version 4.2.1 does not include 'info/dns.so'. At least that was the case for me. However, it does exist in the 4.2 directory and is pointed to by the /DeviceSupport/Latest shortcut. I simply copy-pasted 'info/dns.so' to where the debugger was looking for it and that seemed to fix the warning.
I had this issue with 4.2.1 (8C148a), which I believe is caused by differing DeviceSupport files on the phone and in XCode. I tried many things, but eventually resolved it by deleting this folder:
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/
After this I plugged in my iOS device and was asked to connect and restore the symbol files from the device, and it worked normally again.
When you plug an iOS device (iPad) with a slightly newer OS than the the ones in the SDK, a button to download new symbols should appear in the Organizer window of Xcode. Hit it and wait.
I've seen errors like that when my device wasn't on the same version as what I was building for. Are you sure you're not on a 4.2 beta?
I don't think 8C148a is "final"; final builds numbers never seem to end in a letter (my phone is reporting "4.2.1 (8C148)"). I haven't debugged apps on it yet (I got bored waiting for it to extract symbols and went home).
4.2 GM was 8C134, so you're certainly running newer software, but something somewhere is getting the build number wrong.
But I digress.
What directories are in /Developer/Platforms/iPhoneOS.platform/DeviceSupport? If "4.2.1 (8C148a)" doesn't exist but "4.2.1" does, you might have luck doing something like this in Terminal:
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s "4.2.1" "4.2.1 (8C134a)"
Equivalently, if "4.2.1 (8C148)" exists, do something like this instead:
ln -s "4.2.1 (8C148)" "4.2.1 (8C148a)"
You can generally use this trick to get Xcode to talk to a beta device without installing a beta SDK; this is useful if your company has some people running the beta (for testing purposes) and other people on the latest "final" (for release purposes).
There's a mismatch at the moment, where the released version of 4.2.1 is ahead of the SDK version 4.2
#Khrob's comment fixed it for me though!
Until they provide a solid SDK, a cool workaround is to :
1 - select the Executable ( In 'Executables' in the project browser ),
2 - get info and turn off "Break on Debugger() and DebugStr()"*
Cheers, and best wishes for 2011.
T
This does not disable NSLog.
I have 4.2.1 on an iPhone 3G and Xcode 3.2.5 running on a MacBook Pro with 10.6.6. After a clean install of Xcode, I was getting the prompt to download symbols for 4.2.1 after plugging in my iPhone. After the transfer, I would no longer get the prompt when attaching the iPhone, but I was getting tons of "unable to read symbols" messages.
First, what did not work for me:
Creating symbolic link to '4.2 (8C134)' with the name '4.2.1 (8C148)'
Creating symbolic link inside directory '4.2.1 (8C148)' like there is in '4.2 (8C134)' to the ../../Developer/SDKs/iPhoneOS4.2.sdk
Both of the above caused the 'UUID mismatch' errors for several libraries. GDB would start but appear to hang.
Finally, what is currently working for me:
% cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
% mkdir '4.2.1 (8C148)' # if it does not exist
% cd '4.2.1 (8C148)'
% cp ../4.2\ \(8C134\)/DeveloperDiskImage.dmg* .
% cp -r ../../Developer/SDKs/iPhoneOS4.2.sdk Symbols
Attempt to run debug session for an application and watch the Console. For each warning about a UUID mismatch, remove the file indicated in the log message (I had AudioToolbox, CoreMedia, and some others)
Stop GDB and try again, hopefully with success
At least for my application under development, everything now works fine. Hopefully, Xcode 4.0 will clear this up.

Can't compile Three20 template on iOS4

I pulled the latest version of three20 from github and installed their template. I opened it up in XCode, built it, ran it, then I realized the template isn't iOS4 ready.
The first issue I found was "Base SDK not found". I solved it in Edit Project Setting by changing the Base SDK to "iOS Device 4.1".
Then I ran it again. I got tons of errors related to "Three20/Three.h: No such file or directory". I added the "../three20/src" to my Header Search Paths but it doesn't help.
Does anyone know why? What else should I change?
FYI:
XCode Version 3.2.4
Latest version of three20 (29 September)
Directories:
xcode/myproject/
xcode/three20/
PS: the template works fine in SDK 3.0
I was pulling my hair out as well since adding three20 correctly to your new iOS4 with really basic instructions listed here: http://github.com/facebook/three20 did not work as well.
Issue: Can compile newly three20 to your iOS project and got this error: Can't find #import "Three20/Three20.h".
Here is the best solution for those have the same issue:
1) Add your three20 to your iphone project path like this:
[yourProjectPath]/[iOSProjectName]/three20/..
2) cd three20 dir
3) run:
python src/scripts/ttmodule.py -p [yourProjectPath]/[iOSProjectName]/[iOSProjectName].xcodeproj Three20 -c Debug -c Release
4) go to XCode and do a build now.
Thanks to jverkoey for adding this in ...man
u save us a lot of headache if u ever read this :- ) kudos bud! :- )
http://github.com/facebook/three20/commit/0814b1c149cbe987557c88a271f999c3f9f3ae64
Please vote this answers if it help u. Thanks :-)
Turn out I have to use http://github.com/ECP/three20 instead .
An answer I got from twitter - "need to manually set build target of each projects"
He might be right.
My solution was to add the following to the Header Search Path in Xcode:
three20/Build/Products/three20
Xcode 4 screen shot:
Yours may be different of course, but maybe this will help someone.
Also, try checking the Deployment Target under Project Settings, for both, Simulator and Device. In my case, I got thousands of errors because the target was set to 2.2. It seems there is no support for 2.2 anymore in iOS 4.1 and Xcode 3.2.4.

iPhone Development - Compiler Warning!

Sometimes when i try to "build"/compile a downloaded source, i get following warning:
ld: warning: directory '/Volumes/Skiiing2/CD/ViewBased/Unknown Path/System/Library/Frameworks' following -F not found
Has anyone else seen this issue?
I just upgraded to iPhone SDK version 3.2, and ran into this problem. It looks like it happens on all my projects that were created with the 3.1.2 SDK.
After some amount of searching, I finally was able to find it in the project settings. You have to "Get Info" on the target to find it. Click the "Build" tab, and scroll down to "Search Paths". It can be deleted from there.
Yes. I've found this path in search path settings but not for project but for target!
this specific warning with the 'skiing' reference was a bug in the latest xcode beta for iPad. make sure your running either the latest xcode beta or the latest production xcode.. you should not see that warning again.
Your project is set up to use a framework that was once on a removable disk of some kind, that is no longer there. You can make the warning go away by removing that path from the linker command line, you'll find a property in the project somewhere that references it.

Error in xcode project: ld: library not found for -lcrt1.10.6.o

Just upgraded to Snow Leopard, installed Xcode 3.2, then installed iPhone SDK 3 for SL.
In a project, I now get the following error on build:
ld: library not found for -lcrt1.10.6.o
I've searched around the net, but nothing helpful can be found.
Edit Project Settings -> In the build tab -> For Mac OS X Deployment Target, change it to 10.5 for XCode 3 (not 10.6 even if on 10.6) and see if that helps.
For XCode 4, you'll need to set it to 10.6
P.S. Make sure you set that for all targets, not just release or debug. (if you didn't, one would fail, the other wouldn't)
Add the following to ~/.profile (for Mac OS X 10.5):
export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/include
export LIBRARY_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/lib
I was able to fix this problem by adding the following to my Makefile:
CFLAGS="$(OTHER_CFLAGS) -mmacosx-version-min=10.5"
LDFLAGS="$(OTHER_LDFLAGS) -mmacosx-version-min=10.5"
Ostensibly, this is only required when building outside of Xcode. This problem frustrated me long enough that I figured it would be useful to share my experience here.
It looks like you're picking up libraries from /usr/lib, which is wholly inappropriate for the iPhone SDK. I would assume you've changed your build settings to add /usr/lib to the library search paths. This should be completely unnecessary in the first place, as /usr/lib is in the compiler's standard search paths, but if you need to have a modified search path like this, make sure to use $(SDKROOT)/usr/lib instead.
Setting deployment target to compiler defaults solved the problem. Don't change anything else.
The compiler normally uses crt1.o combined with crt[i/n].o and crt[begin/end].o to support the constructors and destructors (functions called before and after main and exit).
This error could be caused by this missing library file for the specific deployment target.
First, do some investigation, like:
List all your deployment targets:
ls -la /Developer/SDKs
Find which crt1 libraries do you have for which environment
find /Developer/SDKs -name crt1\*
You could see something like:
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.10.5.o
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.o
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/crt1.10.5.o
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/crt1.10.6.o
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/crt1.o
As you can see in above example, crt1.10.6.o is missing for MacOSX10.5.
Solution 1
You can solve that by creating the link to the missing file pointed to the other environment, or you could change your deployment target.
E.g.
ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/lib/crt1.10.6.o /Developer/SDKs/MacOSX10.5.sdk/usr/lib/
Other reason why it's missing, is that you could have different gcc installed in your system. E.g.:
which gcc
xcrun -find gcc
brew list | grep gcc; brew list gcc47
Solution 2
So when you're compiling using make, you can actually specify the right compiler by CC variable. E.g.
CC=/path/to/gcc-3.4 make
Solution 3
What you can also try is specifying the right target deployment environment variable for gcc, e.g.:
export MACOSX_DEPLOYMENT_TARGET=10.5
If this works, then you can add this library path to your shell profile (~/.profile).
E.g.
export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/include
export LIBRARY_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/lib
Or by temporary exporting them.
How to test
Create the example conftest.c file with the following code:
#ifdef __GNUC__
yes;
#endif
And try to compile it via:
gcc conftest.c
cc conftest.c
cc conftest.cc conftest.c
Wasted few hours on this one...
Interestingly, for me the problem was only for Simulator-Debug.
It wasnt complaining for Simulator-Release or Device Debug/Release!
anyway, Changing Deployment Target to 10.5 solved this for me!!
This problem solved by setting Mac OS X Deployment Target to 10.5 and after this set back to Compiler Default :)
I had this problem when I was using Xcode 4 on one machine and Xcode 3.2.6 on another. The two versions are supposed to be able to swap .xcodeproj files between them but I found that in the project.pbxproj file (inside the .xcodeproj directory), there were still a couple of places that read:
MACOSX_DEPLOYMENT_TARGET = 10.6;
I quit Xcode and went and changed the three occurrences to:
MACOSX_DEPLOYMENT_TARGET = 10.5;
After reopening the project, I could build again. Whew!
I had the same error message, none of the above solutions worked for me. I resolved it by deleting the *.pbxuser and *.mode1v3 files inside the xcodeproj file.
Control/click the xcode *.xcodeproj file
Select the "show package contents" option from the menu
A window will open with the contents
Delete the pbxuser/mode1v3 files that start with your user name
Rebuild the project
I had the same issue in a Fortran Makefile.
Added the following option after the compiler (For OSX 10.5):
-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib
e.g.,
g77 -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib
Now the compiler will find the library you want !
Add the following to ~/.profile (for Mac OS X 10.5):
export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/include
export LIBRARY_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/lib
Given Kirandan's limited scenario (Snow Leopard, Xcode 3.2.1, iphone, library path error), Stefan's answer (above) worked for me, except my exception was with 10.5 (-lcrt1.10.5.o).
Elsewhere, I'd seen an answer by Gabor Cselle (author of reMail), and he fixed this specific issue by using a symbolic link (someone referenced this page, by the way), but he noted this was not the best way.