XCode shell script error - c++

I just moved over to a new MacBook Air (10.8) and a 64-bit project that compiled before gives me Shell Script Invocation Error: /bin/sh failed with exit code 2
It looks like XCode 4.6 is failing on one of the intermediate files, saying unexpected EOF while looking for matching '"' in a file ending in .sh
Any ideas how to fix this?
Thank
Bill

Related

SublimeText won't let me compile C++

I keep getting the same error on a simple piece of code after I downloaded multiple compilers and added them to 'PATH' in windows settings
Error :
E:\Programs\sublimeProjects\helloWorld: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
[Finished in 985ms]
I downloaded multiple compilers and added them to 'PATH' in windows settings
This is a very bad idea. You will run into a complete mess where parts of one compiler interfere with parts of the other compiler due to them all being on the PATH.
I would recommend to immediately remove all compilers from the PATH. Instead, what you should do is have a batch file or shell script that you run to set up the environment for just that window.
Some compiler installations come already set up this way (e.g. mingw-w64/MSYS2).
In SublimeText you can set it to use that batch file or script to set up the build environment, e.g. see https://gist.github.com/sagebind/9039773048a3900fa49a .

C++ build failing on MacOS

I'm trying to run my C++ program on my Macbook and I'm trying to run my program in VSCode by running the build task C/C++:clang++ build active file. However, every time I do this I get this error ld: can't open output file for writing: /Users/admin/first/first, errno=21 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) The terminal process terminated with exit code: 1
This appears to be a simple permission problem here:
ld: can't open output file for writing
The linker cannot write to the file specified.
Edit: As correctly pointed to by molbdnilo, the error 21 is EISDIR, which means the file you are trying to write to already exists as a directory. So ... just this folder? :)
Did you brew install any c++ tools? Sometimes that is the source of these issues. The program is trying to use native OS versions of things when it should use Homebrew's or vice versa.

VS Code C++ issue

I tried to compile a cpp file using VScode, but I have got an issue. The tdm-gcc have already added to environment variable. I tried to reboot my computer but it didn't work. Here is the error.
error:
/usr/bin/bash: D:TDM-GCC-64bing++.exe: command not found
The terminal process terminated with exit code: 127

Eclipse CDT issue with building project

I'm getting a strange problem with my C/C++ dev environment. I had installed gcc, g++ on my linux box(ubuntu 14.04).
With the hello world program being built on my system I'm getting this error:
make all
/bin/sh: 1: Syntax error: Unterminated quoted string
make: *** [src/Banker's.o] Error 2
has anyone encountered to this problem before could help me with this?
It looks like your problem is in the name of the file you're trying to compile: Banker's.c. Rename the source to Bankers.c without the single quote in it.
mv src/"Banker's.c" src/"Bankers.c"

Xcode shell script invocation error

I just moved over to a new MacBook Air (10.8) and a 64-bit project that compiled before gives me Shell Script Invocation Error: /bin/sh failed with exit code 2
It looks like XCode 4.6 is failing on one of the intermediate files, saying unexpected EOF while looking for matching '"' in a file ending in .sh:
/Users/billferster/Library/Developer/Xcode/DerivedData/MovingPicture-hcmztqjnatzylkburxulgmdynyqg/Build/Intermediates/MovingPicture.build/Debug/MovingPicture.build/Script-E004D330137B9E5B00FDC604.sh: line 6: unexpected EOF while looking for matching `"'
/Users/billferster/Library/Developer/Xcode/DerivedData/MovingPicture-hcmztqjnatzylkburxulgmdynyqg/Build/Intermediates/MovingPicture.build/Debug/MovingPicture.build/Script-E004D330137B9E5B00FDC604.sh: line 7: syntax error: unexpected end of file
Command /bin/sh failed with exit code 2
Any ideas how to fix this?
Thank
Bill
it was was it said it was. A missing "