News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

can't compile anything (please help a newbee!)[solved]

Started by pelyot, September 01, 2007, 11:12:52 PM

Previous topic - Next topic

pelyot

I can't compile any program, the same error occurs:
-------------- Build: Debug in test ---------------
Compiling: main.cpp
/bin/sh: Syntax error: "(" unexpected
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

Somebody knows what to do?

David Perfors

Which os? version or revision of C::B? Without that we don't know anything...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

pelyot

sorru for the lack of detail:
I'm on kubuntu 7.04 and the CB build is the 4413;
Thanks for any help!

MortenMacFly

Quote from: pelyot on September 02, 2007, 12:30:16 AM
sorru for the lack of detail:
Well - could you give as a minimal project that files? Could you enable full command line logging and post the log (see my sig)?
With regards, Morten.

Ps.: Imagine the following error report: "My windows does not work. It crashes. Can you help me?" What help would you expect?! ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

pelyot

with the full command line logging, I get this message:
-------------- Build: Debug in test ---------------
g++ -Wall -fexceptions -g  -I/usr/include  -c /home/pelyot/C++(devel)/myProjects/temp/test/main.cpp -o obj/Debug/main.o
/bin/sh: Syntax error: "(" unexpected
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

(and this for every file, or every project I try to compile, even this basic console "hello world")

raph

Rename folder C++(devel) to something without braces.

JGM

Quote from: pelyot on September 02, 2007, 05:08:28 PM
-------------- Build: Debug in test ---------------
g++ -Wall -fexceptions -g  -I/usr/include  -c /home/pelyot/C++(devel)/myProjects/temp/test/main.cpp -o obj/Debug/main.o
/bin/sh: Syntax error: "(" unexpected
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings


Maybe if you remove the parenthesis from the folder C++(devel) it will work. Try using CPPDevel instead of C++(devel)

pelyot

Thanks, but I now get this: :(
-------------- Build: Debug in test ---------------
g++ -Wall -fexceptions -g   -c /home/pelyot/C++Devel/myProjects/temp/test/main.cpp -o obj/Debug/main.o
/bin/sh: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings


JGM

#8
you got to install GCC, search on synaptic for GCC or build essentials I think

Edit:
You can try on a console:
sudo apt-get install build-essential

pelyot

I thought g++ was already installed on kunbuntu...
But it now works very well :D. Thanks a lot!

thomas

I'm surprised this doesn't work... () is not illegal in a path, is it?

Especially under Linux, where you can name a file foo*?bar.c too, if you think that it's a good idea (it is not, but you can do it). But seriously, no joking... files like foo-1.4.3-15(2).tar.gz aren't entirely uncommon, so the same thing should really work with Code::Blocks too :)

Maybe we need to quote filenames more rigorously, not only if they contain spaces. It seems that gcc calls sh for some of its work, and the shell believes it has to do something about the unquoted (). Does that seem about right? So... we should make sure it doesn't.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."