Author Topic: problems in compiling/executing simple programs on Ubuntu 14.04  (Read 4563 times)

Offline lingiro

  • Single posting newcomer
  • *
  • Posts: 3
Hello,

I'm not able to make the release 13.12 working on my system Ubuntu 14.04.
With previous codeblock-release/system (Ubuntu 12.04) no problems.
Now it seems that it doesn't find the object file in the designed directory. Probably it's only a problem of default path-setting, but I'm not able to see where to set it.
The followings are the results of compiling/executing a simple program in a C file (paroladentro.c):

Buid messages
||warning: -c: File o directory non esistente [enabled by default]|
||=== Build failed: 0 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|

Build log
gcc -march=corei7 -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Wmain -Wfatal-errors -Wextra -Wall -ansi -I/home/linoski/Cprogr -I/home/linoski/Cprogr -I -c /home/linoski/Cprogr/paroladentro.c -o /home/linoski/Cprogr/paroladentro.o

cc1: warning: -c: File o directory non esistente [enabled by default]
g++  -o /home/linoski/Cprogr/paroladentro /home/linoski/Cprogr/paroladentro.o 
/bin/sh: 1: g++: not found
 
Checking for existence: /home/linoski/Cprogr/paroladentro

At running
It seems that this file has not been built yet.
Do you want to build it now?
Process terminated with status 127 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))

Further observations:
1) paraoladentro.c and paroladentro.o exist in /home/linoski/cprogr
2) all permissions are given

Thank You in advance.

Offline marcelinux

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: problems in compiling/executing simple programs on Ubuntu 14.04
« Reply #1 on: April 09, 2015, 04:26:48 pm »
/bin/sh: 1: g++: not found
You need install build-essential in ubuntu.
But g++ is for c++ sources.
Try selecting C compiler at startup C::B project.

Regards.
« Last Edit: April 09, 2015, 04:28:35 pm by marcelinux »
I just need learn a little bit more. Thank you for your help.

Offline lingiro

  • Single posting newcomer
  • *
  • Posts: 3
Re: problems in compiling/executing simple programs on Ubuntu 14.04
« Reply #2 on: April 09, 2015, 05:43:00 pm »
Thanks, I'll try. But, Do you think it's better to remove the present installation and replace it with a new, one not by IDLE but directly by command line? Could the following  sequence be correct?
apt-get purge codeblocks 
apt-get codeblocks
Thank you again

Offline lingiro

  • Single posting newcomer
  • *
  • Posts: 3
Re: problems in compiling/executing simple programs on Ubuntu 14.04
« Reply #3 on: April 09, 2015, 06:42:36 pm »
I tried to install build-essential, but without good results.
I've just compiled the usual first program:
#include <stdio.h>
int main (void)
{
    printf ("hello");
    return 0;
    getchar();

}
And this is what appears:

||warning: -c: File o directory non esistente [enabled by default]|

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o:/build/buildd/eglibc-2.19/csu/../sysdeps/x86_64/start.S|118|definito qui per la prima volta|
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o:/build/buildd/eglibc-2.19/csu/../sysdeps/x86_64/crti.S|64|definito qui per la prima volta|

||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|

If You can suggest me other solutions... thank You in advance!
Best regards

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: problems in compiling/executing simple programs on Ubuntu 14.04
« Reply #4 on: April 09, 2015, 08:05:51 pm »
I guess it's the empty "-I" with the followinh "-c" that leads to the error.
This might be a C::B bug.
Did you use the console-wizard or did you set up the project yourself.

Can you try a nightly build ?
If I remember correctly, the build from my debian repo works on Ubuntu 14.04 (not absolutely sure about this).

See my signature for a link.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: problems in compiling/executing simple programs on Ubuntu 14.04
« Reply #5 on: April 10, 2015, 12:42:24 am »
Probably you've created a class using the class wizard. This is known to be broken in 13.12.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]