I want to include a Messages_de.properties file in my Xcode project.
I my target's Build Phase I did:
![enter image description here][1]
When I try to build the project I get the following errors:
PBXCp /Users/mg/Documents/Grails/GGTS3.6.3-SR1-2/testproject-core/src/main/resources/testproject/core/i18n/Messages_de.properties /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n/Messages_de.properties
cd /Users/mg/Documents/Grails/GGTS3.6.3-SR1-2/testproject
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/mg/Documents/Grails/GGTS3.6.3-SR1-2/testproject-core/src/main/resources/testproject/core/i18n/Messages_de.properties /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n
error: couldn't create directory /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n: Not a directoryerror: open /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n/Messages_de.properties: Not a directory
(null): error: couldn't create directory /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n: Not a directory
(null): error: open /Users/mg/Library/Developer/Xcode/DerivedData/testproject-bkkczkzivpolszewxttakwlxnztk/Build/Products/Debug-iphoneos/testproject.app/testproject/core/i18n/Messages_de.properties: Not a directory
What causes these errors and how do I fix them?
You are trying to include a directory instead of a file.
Verify into your code, you probably are using directory manager to manage a file.
Related
Currently I have a project and import Parse and Bolts framework manually.
I want to use Pod to instead of manually import. After Pod install, Build project is fine.
However, When I use simulator to run project then get below error message
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64: No such file or directory
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64: No such file or directory
use simulator run app will display error message, after clear and re-run will success. However, stop simulator and re-run will fail. That means, every time run simulator I have to clear first. Have any expert can help ? (xcode 7.3.1)
I've read similar threads but wasn't able to find a solution to my issue.
When I start my project, I first saved it in a folder with blank space in its name (let name it "My Project")
Lets also simplify the path through my project as a simple folder : "My path" (yes, there was blank spaces in the hierarchy).
I used to have issues while building my project, especially with the Library search path in Build settings, regularly coming back with xcode updates or/and duplication of project for keeping a historical.
To solved that, I've replaced all the blank spaces with underscores. So now my project's folder name is "My_Project" and the path "My_path".
These changes have also been performed in the Build Settings of my project.
But today, I have an error I can't get rid of.
When I build my project, every file compile perfectly, but during the "copying" process, I get this kind of error.
/!\Copy AFNetworking ...in /Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder
CpResource /Users/admin/Desktop/My_path/My\ Project/Product-name/Sub\ Folder/AFNetworking /Users/admin/Library/Developer/Xcode/DerivedData/Product-name-gkplyeugxcxhijajdvpxutaodxmz/Build/Products/Release-iphoneos/Product-name.app/AFNetworking
cd /Users/admin/Desktop/My_path/My_Project/Product-name
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/admin/Desktop/My_path/My\ Project/Product-name/Sub\ Folder/AFNetworking /Users/admin/Library/Developer/Xcode/DerivedData/Product-name-gkplyeugxcxhijajdvpxutaodxmz/Build/Products/Release-iphoneos/Product-name.app
-------------------------------------
error: /Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder/AFNetworking: No such file or directory
I don't find in my target's Build Settings any field where blank spaces haven't been replaced by underscores.
Any help appreciated.
(I'm using Xcode 7.2, OS X El Capitan 10.11.2)
I finally find somewhat by chance an answer to my problem.
I've opened the .xcodeproj file in finder, and then edit project.pbxproj.
In this file, I've founded a line :
84635D6F1C22F90100C55AB2 /* AFNetworking */ = {isa = PBXFileReference; lastKnownFileType = folder; name = AFNetworking; path = "/Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder/AFNetworking"; sourceTree = "<absolute>"; };
And retyping it properly made the trick.
This medium post helped me: https://freakycoder.com/ios-notes-47-how-to-solve-xcode-no-such-file-or-directory-error-514106eaf287
Needed to remove the resource under Copy Bundle Resource during the Build Phase
I'm trying to build quantlib for xcode 4.6.
The project of concern is this one: https://github.com/philipbarnes/quantlib-on-iOS
This quantlib project relies on this boost project: https://gitorious.org/boostoniphone/boostoniphone
My problem is I cannot get this boost to build, but I can get another version to build on github also by Pete.
One of the steps in building quantlib for iOS asks to set the boost dir. I tried to adjust this to no avail.
This means I have a dir 'boostoniphone-huuskpes-boostoniphone' - which does not build and was said to be the version to use with the quantlib on iPhone project,
and the dir 'boostoniphone-master' which did build - it has a different build structure with folders and maybe setting the $BOOSTDIR variable in the quantlib project isn't so simple.
These outputs from the console have been shorted for more comfortable reading
My gitorious boost output says:
3 warnings generated.
darwin.archive bin.v2/libs/thread/build/darwin-6.1~iphonesim/release/architecture-x86/link- static/macosx-version-iphonesim-6.0/target-os-iphone/threading-multi/libboost_thread.a
common.copy stage/lib/libboost_thread.a
...updated 120 targets...
=================================================================
Done
Splitting all existing fat binaries...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes- boostoniphone_/src/boost_1_51_0/bin.v2/libs/thread/build/darwin-4.2.1~iphone/release/architecture- arm/link-static/macosx-version-iphone-6.0/target-os-iphone/threading-multi/libboost_thread.a (No such file or directory)
...
and continues with problem repeated , then this error is next
...
ar: obj/*.o: No such file or directory
...armv7s
ar: obj/*.o: No such file or directory
...i386
ar: obj/*.o: No such file or directory
liboficate: thread
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes- boostoniphone_/src/boost_1_51_0/bin.v2/libs/thread/build/darwin-4.2.1~iphone/release/architecture-arm/link-static/macosx-version-iphone-6.0/target-os-iphone/threading-multi/libboost_thread.a (No such file or directory)
as the other boost project works for me it, I try to link it into the buildql.sh script as a boost ref, but I get:
checking for arm-apple-darwin10-gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple- darwin10-llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/colman/Downloads/boostoniphone-huuskpes-boostoniphone_/QuantLib-1.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
and
/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes-boostoniphone_/QuantLib-1.2.1/prefix/armv7/lib/libQuantLib.a (No such file or directory)
A pointer to how to make frameworks may also be a solution? But I think getting the quantlib for iOS project to work is the real solution.
Coming back to the BOOST variable, in the buildql.sh file, changes such as the following have been made:
#: ${BOOST_HOME:=$HOME/workspace/huuskpes-boostoniphone}
: ${BOOST_HOME:=$HOME/workspace/boostoniphone-master/}
: ${BOOST_SRC:=$BOOST_HOME/src/boost_1_51_0}
The following were also altered to attempt to fit the 'boostoniphone-master'
: ${SRCDIR:=`pwd`/src}
: ${BUILDDIR:=`pwd`/build}
: ${PREFIXDIR:=`pwd`/prefix}
: ${FRAMEWORKDIR:=`pwd`/framework}
Thanks for any hints, potential solutions.
Changes to the buildql.sh script look like this:
: ${BOOST_HOME:=/Volumes/Untitled\ 1/workspace/boostoniphone-master/iphone-build/stage/lib}
: ${BOOST_SRC_HOME:=/Volumes/Untitled\ 1/workspace/boostoniphone-master/boostoniphone-master}
: ${BOOST_SRC:=$BOOST_SRC_HOME/src/boost_1_51_0/boost}
...
: ${SRCDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/src}
: ${BUILDDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/build}
: ${PREFIXDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/prefix}
: ${PREFIXDIR_2:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/prefix}
: ${FRAMEWORKDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a}
Build command runs with a new error:
./buildql.sh -with-boost-include=/opt/local/include/ --with-boost-lib=/Volumes/Untitled 1/workspace/boostoniphone-master/iphone-build/stage --prefix=/opt/local/
Current output looks like this:
libtool: link: (cd .libs/libExperimental.lax/libAmortizingBonds.a && ar x "/Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/experimental/amortizingbonds/.libs/libAmortizingBonds.a")
../../libtool: line 1096: cd: .libs/libExperimental.lax/libAmortizingBonds.a: No such file or directory
make[3]: *** [libExperimental.la] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
=================================================================
Done
rm: /Volumes/Untitled: Resource busy
=================================================================
Framework: Setting up directories...
=================================================================
Framework: Creating symlinks...
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Versions/Current: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Headers: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Resources: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Documentation: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/ql: No such file or directory
=================================================================
Framework: Lipoing library into /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Versions/A/ql
/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: $ /Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo -create -arch armv7 /Volumes/Untitled 1/workspace/quantlib-on-iOS- master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/.libs/libQuantLib.a -arch armv7s /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/.libs/libQuantLib.a -arch i386 /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/ QuantLib-1.2.1/ql/.libs/libQuantLib.a -o /Volumes/Untitled (No such file or directory)
Aborted: Lipo failed
Rather than go into all the script details the following is the solution:
Set the paths carefully, that means, try not to have spaces or have data on external drive (although you can)
Set the parameters for the ARM chip, simulator and the iOS version installed very very carefully!
All in all that should be the most of it.
I'm try to to build the stasm library on my mac and hopefully port it to the iphone.
stasm download: http://www.milbo.users.sonic.net/stasm/download.html
I am using the makefile for linux provided.
after some changes to header include paths for libjpeg and opencv, I am stuck with this error
g++ -c ../stasm/violajones.cpp -O3 -Wall -pedantic -I/home/john/OpenCV-2.1.0/include/opencv -I../gsl -I../gsl/gsl -I../image -I../jpeg -I../mat -I../rowley -I../stasm -I../tasm
In file included from ../stasm/violajones.cpp:24:
/opt/local/include/opencv/cv.h:63:33: error: opencv2/core/core_c.h: No such file or directory
/opt/local/include/opencv/cv.h:64:33: error: opencv2/core/core.hpp: No such file or directory
/opt/local/include/opencv/cv.h:65:39: error: opencv2/imgproc/imgproc_c.h: No such file or directory
/opt/local/include/opencv/cv.h:66:39: error: opencv2/imgproc/imgproc.hpp: No such file or directory
/opt/local/include/opencv/cv.h:67:38: error: opencv2/video/tracking.hpp: No such file or directory
/opt/local/include/opencv/cv.h:68:45: error: opencv2/features2d/features2d.hpp: No such file or directory
/opt/local/include/opencv/cv.h:69:35: error: opencv2/flann/flann.hpp: No such file or directory
/opt/local/include/opencv/cv.h:70:39: error: opencv2/calib3d/calib3d.hpp: No such file or directory
/opt/local/include/opencv/cv.h:71:43: error: opencv2/objdetect/objdetect.hpp: No such file or directory
/opt/local/include/opencv/cv.h:72:37: error: opencv2/legacy/compat.hpp: No such file or directory
/opt/local/include/opencv/cv.h:79:37: error: opencv2/core/internal.hpp: No such file or directory In file included
from ../stasm/violajones.cpp:25:
/opt/local/include/opencv/highgui.h:47:39: error: opencv2/highgui/highgui_c.h: No such file or directory
/opt/local/include/opencv/highgui.h:48:39: error: opencv2/highgui/highgui.hpp: No such file or directory
the original makefile is uploaded here https://github.com/tsaizhenling/stuff/blob/master/makefile
i have tried changing the directory as trojanfoe suggested
but still same error :(
I have opencv and opencv2 residing in /opt/local/include/
Update:
tried J-16 SDiZ's suggestion and this brought me forward. I had to remove the pedantic flag but i'm still stuck with the following error
g++ -c ../stasm/tab.cpp -O3 -Wall -I/opt/local/include/opencv
-I/opt/local/include -I../gsl -I../gsl/gsl -I../image -I../jpeg -I../mat -I../rowley -I../stasm -I../tasm make: * No rule to make target -lm', needed bystasm'. Stop.
makefile is updated
Update:
Finally got everything fixed with help from J-16 SDiZ.
had to update the linker flags because opencv changed the library names
makefile is updated in case anyone needs it
Change
INCL=\
-I$(OPENCV_HOME)/include/opencv\
-I../gsl\
to
INCL=\
-I$(OPENCV_HOME)/include/opencv\
-I$(OPENCV_HOME)/include \
-I../gsl\
And you should not use ${LIB} in the dependency.
change
something: xxxxxx $(LIBS) $(OBJ)
to
something: xxxxxx $(OBJ)
I think you should learn how Makefile works, this is a makefile problem.
There are Mac/Linux build scripts for Stasm here:
https://github.com/juan-cardelino/stasm
You can build for iOS easily using this:
https://code.google.com/p/ios-cmake/wiki/HowTo
I am trying to compile a iOS application that uses SQlite in Xcode 4 (for Snow Leopard) and I am getting the following error -
error: /Apps/Cocktails/libsqlite3.dylib: No such file or directory
I copied the file libsqlite3.dylib into the Xcode project but the error won't go away. How do I resolve the error ?
EDIT - Here is the complete error log
CpResource libsqlite3.0.dylib /Users/ashishagarwal/Library/Developer/Xcode/DerivedData/Cocktails-gzqdmwrvzqciekgjzxnriugcxwwm/Build/Products/Debug-iphonesimulator/Cocktails.app/libsqlite3.0.dylib
cd /Apps/Cocktails
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Apps/Cocktails/libsqlite3.0.dylib /Users/ashishagarwal/Library/Developer/Xcode/DerivedData/Cocktails-gzqdmwrvzqciekgjzxnriugcxwwm/Build/Products/Debug-iphonesimulator/Cocktails.app
error: /Apps/Cocktails/libsqlite3.dylib: No such file or directory
It looks your library is missing libsqlite3.dylib and
libsqlite3.0.dylib, so copy these files from any other computer and place these files in your computer.
Procedure:
1:Open xcode on the computer where these files exists, add libsqlite3.0.dylib in your project from link binary with libraries.
2: Right click on the libsqlite3.0.dylib and show in finder.
3: Copy two files libsqlite3.0.dylib and libsqlite3.dylib and place on the same location on other computer where these files are missing.
Here you go, I had the same problem and solved in this way.