Code::Blocks Forums

User forums => Help => Topic started by: pelyot on September 01, 2007, 11:12:52 pm

Title: can't compile anything (please help a newbee!)[solved]
Post by: pelyot on September 01, 2007, 11:12:52 pm
I can't compile any program, the same error occurs:
Code
-------------- 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?
Title: Re: can't compile anything (please help a newbee!)
Post by: David Perfors on September 02, 2007, 12:22:28 am
Which os? version or revision of C::B? Without that we don't know anything...
Title: Re: can't compile anything (please help a newbee!)
Post by: pelyot on September 02, 2007, 12:30:16 am
sorru for the lack of detail:
I'm on kubuntu 7.04 and the CB build is the 4413;
Thanks for any help!
Title: Re: can't compile anything (please help a newbee!)
Post by: MortenMacFly on September 02, 2007, 12:49:22 pm
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?! ;-)
Title: Re: can't compile anything (please help a newbee!)
Post by: pelyot on September 02, 2007, 05:08:28 pm
with the full command line logging, I get this message:
Code
-------------- 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")
Title: Re: can't compile anything (please help a newbee!)
Post by: raph on September 02, 2007, 05:20:00 pm
Rename folder C++(devel) to something without braces.
Title: Re: can't compile anything (please help a newbee!)
Post by: JGM on September 02, 2007, 05:22:13 pm
Code
-------------- 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)
Title: Re: can't compile anything (please help a newbee!)
Post by: pelyot on September 02, 2007, 05:32:02 pm
Thanks, but I now get this: :(
Code
-------------- 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
 
Title: Re: can't compile anything (please help a newbee!)
Post by: JGM on September 02, 2007, 05:35:24 pm
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
Title: Re: can't compile anything (please help a newbee!)
Post by: pelyot on September 02, 2007, 05:39:26 pm
I thought g++ was already installed on kunbuntu...
But it now works very well :D. Thanks a lot!
Title: Re: can't compile anything (please help a newbee!)[solved]
Post by: thomas on September 03, 2007, 10:42:25 am
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.