Xcode 7.2 - clang: error: no such file or directory: - ios

I keep trying to run my Xcode project titled 'Simple Calculator' and it keeps giving me the following error,
clang: error: no such file or directory:
'/Users/computerscienceyr1/Desktop/Simple Calculator/Simple
Calculator/ViewController.m'
Here is a screenshot of the whole issue Screenshot.
Each time I create a 'Simple Calculator' Directory, the error extends into: '/Users/computerscienceyr1/Desktop/Simple Calculator/Simple Calculator/Simple Calculator/ViewController.m' and goes on and on.
**UPDATED**
This is what happens when double clicked Screenshot.
Targets> Build Phases> Compile Sources - File exists.
Removed ViewController.m and others again. No changes occurred.

Try this: open the .pbxproj file, search for the file name and delete the rows where it appears, then add the file again to your project.
This post may help you as well.

Related

when i build "gomobile bind" a go project with opencv4 ,error come ,how can i solve

Gomobile bind error
The array mean what, Anybody ever had this problem?
go build -tags ios -buildmode=c-archive -o/var/folders/vp/3ztk4jzn3hq35qfmp3qwrfm80000gp/T/gomobile-work135205628/faceTest-arm.a gobind failed: exit status 2
# gocv.io/x/gocv
In file included from calib3d.cpp:1:
In file included from ../../../../../gocv.io/x/gocv/calib3d.h:5:
In file included from /usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/opencv.hpp:52:
In file included from /usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/core.hpp:52:
/usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/core/cvdef.h:659:10:
fatal error: 'array' file not found

No such file or directory when generate framework

When I make a new framework with aggregate to generate universal framework , but a error present , as follow :
cp: build/Release-iphoneos/TEST.framework/: No such file or directory
fatal error: lipo: can't open input file: build/Release-iphoneos/TEST.framework/TEST (No such file or directory)
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
And here is a screenshot of the error:
This is a new target , I only want to test generate framework , but fail!
As the error message said, no TEST.framework can be found in the path <PROJECT_DIR>/build/Release-iphoneos/TEST.framework.
You need to check the script you use, or the blog post which you reference is out-date.
First you should build the target specified in xcodebuild command directly to see if it can build succeed.
Check what the actual build path is. If the path(build/) is not exist, you can try to specified the build path for xcodebuild, OBJROOT=${WRK_DIR} SYMROOT=${WRK_DIR}

'warning: directory not found for option' error on build

All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:
ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos'
ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.
Anyone have any ideas?
I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"
This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths
Setting location
My project continues compiling and working fine, after removing this option.
Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9.
This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
to :
FRAMEWORK_SEARCH_PATHS = "";

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit

I am facing the following error in my application.
clang: error: no such file or directory: '/Users/madhavadudipalli/Desktop/ ios projects/Little Flower Public School /Little Flower Public School Ipad/Little Flower Public S chool HD-Prefix*.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Please tell me what does this mean and what should I do to resolve this one. Been sometime since I have stuck on this one. Kindly Guide me where am I going wrong here.
Thanks in advance.
Following steps fixed this problem:
Issue: Compiler unable to locate Little Flower Public S chool HD-Prefix.pch file. This is because Location of Prefix Header file Little Flower Public S chool HD-Prefix-Prefix.pch in Project Target is incorrect.
The location is defined in Project Target/Build setting. You will need to go to:
Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 5.1 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.
Normally Prefix header file is located under "Supporting File" Folder in your project

c lang error in xcode 5.0 after adding "fno-objc-arc" for some classes

I am working on Xcode 5.0,i copied JSON library files in to my project which are built with non arc, so i added complier flag "fno-objc-arc"for those JSON library compiler sources.
After doing this i am getting apple LLVM 5.o error.
clang: error: no such file or directory: 'fno-objc-arc'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Pleas help me to resolve this error.
If that's a command line option, and it is, you need to prefix it with a hyphen, such as with:
clang -fno-objc-arc ...
If you just use fno-objc-arc, it's going to think it's a file name you want compiled, and complain bitterly that no such file exists, as indeed it seems to be doing with the no such file or directory: 'fno-objc-arc' error.
Please note that there is no new line character after -fno-objc-arc. You can be assured by entering -fno-objc-arc and click somewhere around instead of hitting enter/return key.
This got my problem fixed!

Resources