Eclipse CDT issue with building project - c++

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"

Related

How to correct path to overcome Error 127?

I'm trying to run a c++ file which requires an mkl library. I installed that library in a folder on home. But I'm getting following error. I searched that this error is due to incorrect path assign. How can I correct that path?
`/public/intel/bin/icpc -g -I/public/intel/mkl/include -c main.cc
make: /public/intel/bin/icpc: Command not found
[main.o] Error 127
makefile:6: recipe for target 'main.o' failed
make: *** [main.o] Error 127`
Jerry,
It looks like you are using Linux or UNIX. Also it looks like you are trying to use ICC (the Intel compiler) with MKL. If you are using ICC, the Linux compile command is "icc", the Windows compile command is "icl".
Beyond that, you need to source the ??vars.sh files if you have not set the environment variables manually. For example, if you installed Parallel Studio, you would set up compiler environment variables as explained here: https://software.intel.com/en-us/articles/setting-up-the-build-environment-for-using-intel-c-or-fortran-compilers; and you would set up MKL environment variables as explained here: https://software.intel.com/en-us/mkl-linux-developer-guide-scripts-to-set-environment-variables.
Let me know if this helps.

Error when compiling Qt project. The process "/usr/bin/make" exited with code 2

I'm brand new to Qt and I tried to build a new project. I searched around and people seem to have similar problems but none of the solutions worked for me. I made New Project > Application > Qt widgets Application > created "Tester" file in /Volumes/MATT'S EHD/Qt > Kit: Desktop Qt 5.8.0 clang 64bit
I build it and this is my output:
sh: line 0: cd: /Volumes/MATTS\ EHD/Qt/build-Tester-Desktop_Qt_5_8_0_clang_64bit-Debug && /Volumes/MATT\S EHD/Qt/5.8/clang_64/bin/uic:
No such file or directory
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [main.o] Error 2
11:43:23: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Tester (kit: Desktop Qt 5.8.0 clang 64bit)
When executing step "Make"
There's some other output but these are what's outputting in red and I'm assuming what's giving me issues. I haven't changed the file at all. I'm just trying to build it to see if it works and it doesn't. I'm running on OSX and everything is stored on my external hard drive. Any help is appreciated.
Since the error message complains about a missing matching (in that case closing) single quote, I strongly suspect your “MATT'S EHD” directory is a problem. That’s not too surprising because build systems in the C and C++ world are notoriously crappy when it comes to handling paths with spaces and/or quote characters.
Try a spaceless and quoteless path, not only for your project but also for your complete toolchain, especially the Qt installation. If you can’t or dont want to move your toolchain you can also try to backslash escape all special characters in Qt Creator’s “Build & Run” options. Should work theoretically, but I’ve never tried it in practice.

XCode shell script 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
Any ideas how to fix this?
Thank
Bill

How to run Netbeans makefile on terminal

I am trying to run the netbeans makefile via my terminal of one of my C++ project
While executing
Make
, I receive the following errors:
...
/bin/sh: 1: -o: not found
make[1]: *** [nbproject/qt-Debug.mk] Error 127
...
What should I do? Thanks in advance. Please note that I can easily build the program via Netbeans.
EDIT : I use ubuntu 13.04, netbeans 7.3, linux terminal.
I simply use:
make
or
make CONF=Release
in the project root (where the Makefile is located), and it works. I have a simple C++ project without anything extra.

dev c++ compiler error

i am getting this error at compile (actually this is a very simple project and the syntax is absolutely ok)
E:\proj1\Makefile.win [Build Error] [main.o] Error 1
this is my compiler log (dev c++ v 4.9.9.2)
Compiler: Default compiler
Building Makefile: "E:\proj1\Makefile.win"
Executing make...
make.exe -f "E:\proj1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
'C:\Users\r' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
make.exe: *** [main.o] Error 1
Execution terminated
my user path is 'c:\Users\r&d', i think the '&' is makeing trouble in compile process , does anybody has any idea ?, i can not reinstall windows because i have got many softwares installed on my current windows and it is very time consuming to me, how can i fix this /
r&d is definitely a problem. Try surrounding it with quotes: "c:\users\r&d" and hope for the best. If it doesn't work, change the folder to something without an ampersand (you don't need to reinstall Windows for that, just create another user).
You can try creating another user without the ampersand, and then copying your profile to it to keep all your settings and application preferences, as well as documents.
You might want to try another build enviroment, like code:blocks which has its own internal build system. You probably want make sure you are using the latest gcc mingw compiler and build system from mingw(use their installer, I think it was http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/ ), and even if you don't go with code::blocks, make sure you are using the new branch of devc++ that was forked and still being developed. One last thing is if you go with code::blocks, use a nightly build in the forum, http://forums.codeblocks.org/index.php/board,20.0.html as they are much more up to date.
The escape character in Windows is ^. So try
C:\Users\r^&d