C++ and Objective C in Xcode project - xcode

I have recently updated Xcode to version Version 3.2.2 (Pre-release). It is working fine with old Objective-C projects but I experience some problems with projects which have mix of Objective-C/Objective-C++ code. During the compilation I am getting the following error:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/bits/functexcept.h:41:28: error: bits/c++config.h: No such file or directory
I have checked the path a compiler complains about and found that file functexcept.h is located in the following path:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv7-apple-darwin9/bits/
My question is where I should change that path to correct one in Xcode?
Thanks in advance.

Try to make a symlink pointing arm-apple-darwin10 to arm-apple-darwin9:
cd /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/
sudo ln -s arm-apple-darwin9 arm-apple-darwin10
Report a bug to Apple.

After installation of the iPhone SDK with XCode (Version 3.2.1) problem has gone.

Related

"no such sysroot directory" while building qt project

MacOS Mojave Version 10.14 (18A389).
Today I updated Xcode to version 10.0 (10A255). End when I try to build my Qt project I get an error:
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk' [-Wmissing-sysroot]
In file included from ../greed/timediagram.cpp:1:
In file included from ../../../Qt/5.9.1/clang_64/lib/QtGui.framework/Headers/QtGui:3:
In file included from /Users/arsenyspiridonov/Qt/5.9.1/clang_64/lib/QtGui.framework/Headers/QtGuiDepends:3:
In file included from /Users/arsenyspiridonov/Qt/5.9.1/clang_64/lib/QtCore.framework/Headers/QtCore:4:
In file included from ../../../Qt/5.9.1/clang_64/lib/QtCore.framework/Headers/qglobal.h:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:202:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
#include_next <string.h>
^~~~~~~~~~
1 error generated.
make: *** [timediagram.o] Error 1
16:13:47: Процесс «/usr/bin/make» завершился с кодом 2.
Ошибка при сборке/установке проекта greed (комплект: Desktop Qt 5.9.1 clang 64bit)
Во время выполнения этапа «Сборка»
What's the problem? How to fix it?
add 'QMAKE_MAC_SDK = macosx10.14' to your .pro file, and manually delete .qmake.stash from your build directory (or directories).
In my case I updated xcode to the last version, so instead of have on the folder the version 10.13, I had MacOSX10.14.sdk ( that is a symbolic link to the folder MacOSX.sdk)
so, you can solve the problem with this code on terminal:
sudo ln -s MacOSX.sdk/ MacOSX10.13.sdk
positioned on the current folder.
I hope it helps.
I just reinstalled Qt. All is Ok now
This helped me:
Close the project in Qt Creator.
Delete the .pro.user file in your code directory.
Add QMAKE_MAC_SDK = macosx10.14 and QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 to your .pro file in a text editor (not in Qt Creator). Replace 10.14 with whatever MacOS version you want to build for.
Re-open the project in Qt Creator. It will reconfigure.
Build.
Adding to sellen's Answer: If you have trouble locating your .qmake.stash file, or if you don't have a .qmake.stash file in your build folder, try locating it using the terminal:
find /path/to/base/folder -name ".qmake.stash"
In my case I had a .qmake.stash file in my build parent folder, but not in my build folder. Not sure how it got there but somehow QMake picked it up and as soon as I deleted it and restarted Qt Creator things started to work again.
the fast solution is to create new shotcut in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs folder, you can copy the exist shortcut, them change the name you need.
This happen to me recently and my Xcode needed to update. So I would recommend quitting xcode and trying to update your current version to see if that fixes your problem.

Meteor 1.2: Xcode 7.0.1 build issue

I recently updated my Xcode to Xcode 7.0.1. My project used to compile and build for ios without issues on Xcode 6.4. Now, I'm having this error:
Cordova/CDVViewController.h file not found in the line -
#import <Cordova/CDVViewController.h>
Please let me know how to fix this.
P.S. "archiving" doesn't produce errors
I found the answer here: http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232/5
From the author shazron
Add this line to your Build Settings -> Header Search Paths:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.
This probably had something to do with tvOS, I reckon -- Apple had to separate the archive intermediates by platform for universal builds.

Parse/Parse.h file not found - Xcode 6

I created project with cordova and ionic. I installed a Parse plugin (http://plugins.cordova.io/#/package/com.parse.cordova.core.pushplugin).
When I open my project with Xcode I have an error:
Parse/Parse.h file not found
I tried a lot of solutions found on stackoverflow, but none corrects my problem.
Framework Search Paths
"MyApp/Plugins/com.parse.cordova.core.pushplugin"
Try this plugin, it has updated Parse SDK framework.
https://github.com/avivais/phonegap-parse-plugin
Install the plugin like this (do not use Installation method url from README) -
phonegap plugin add https://github.com/avivais/phonegap-parse-plugin.git
OR
cordova plugin add https://github.com/avivais/phonegap-parse-plugin.git
I am having the same issue and posted it on GitHub (https://github.com/avivais/phonegap-parse-plugin/issues/49).
My temporary workaround is:
$ cordova plugin add https://github.com/avivais/phonegap-parse-plugin
$ ionic platform rm ios
$ ionic platform add ios
XCode complains about the Parse.h file not found. It is in fact there. All I need to do is:
open the project in XCode,
go to General > Linked Frameworks and libraries
remove, then add the Parse.framework from the same directory
build
Actually, a better workaround is to make the Platform search path recursive, like so:
https://stackoverflow.com/a/20856145/3889068

Lexical or Preprocessor issue with Xcode 4.6.1

My App could work with Xcode 4.3.3 before. But when I want to make it for adhoc test by Product -- Archive with Xcode 4.6.1, following error appears:
three20UI.h, Lexical or Preprocessor issue, 'Three20UI/TTTableImageItemCell.h' file not found.
Please help, thanks!
Three20UI/TTTableImageItemCell.h file is missing, go to your folder and then add this file again.

XCode 4.3.2 Settings.bundle missing files

Env: XCode 4.3.2, IOS 5.1
I am trying to add a setting.bundle for my project.
File->New->File->IOS Resource->Setting.bundle->Next->Create
There are no files in this bundle. I tried "cd" in the terminal, but I still cannot see anything — it is an empty directory.
There should be 3 files and 1 directory in the bundle. Can anyone please tell me why I am missing all these files, or has Apple changed the concept for settings.bundle or something?
I tried this with several my projects and even re-installed xcode and lion, no luck at all.
P.S: Changing the file type for the setting.bundle does not help; no such option in 4.3.2.
A clean install solved this issue.

Resources