1

I am new to codelite and have set up a new g++ Project:

#include <stdio.h>

int main(int argc, char **argv)
{
    printf("hello world\n");
    return 0;
}

However, if I click 'Build Active Project' the Build ouput says:

/bin/sh -c ' -j 1 -e -f Makefile'
/bin/sh: 1: -j: not found
0 errors, 0 warnings

I tried the by default generated Makefile as well as a custom one. What is wrong here that the build operation fails without any error?


I'm using following software:
OS: Ubuntu 14.04.01 LTS 64bit, as a virtual machine with Windows 7 as Host
IDE: CodeLite 7.0 for Trusty Tahr (=Ubuntu 14.04)
Compiler, Tools: I installed g++ and gdb from the command line, in case I forgot something, I listed the output of apt list

Binkan Salaryman
  • 3,008
  • 1
  • 17
  • 29
  • **OS:** Ubuntu 14.04.01 LTS 64bit, as a virtual machine with Windows 7 as Host **CodeLite:** Version 7.0 for Trusty Tahr (=Ubuntu 14.04) I installed g++ and gdb from the command line – Binkan Salaryman Mar 18 '15 at 08:30
  • 1
    What do you have in 'Settings... -> Build Settings... -> Compiler : Make' of your toolchain ? – Jarod42 Mar 18 '15 at 08:36
  • For the compiler gnu g++, it's `-j 1` – Binkan Salaryman Mar 18 '15 at 08:47
  • 1
    I think it should be `make -j 1` instead. (check also that you have `make` installed). – Jarod42 Mar 18 '15 at 08:53
  • Thank you so much, it works! However, if I run/debug the program its console immediately closes; if I drop a breakpoint at `return 0;` it shows me at the first line: `&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"`Is there a way I can properly view the program's output? (I have checked the "output" tab in codelite.) *P.S.:* Repost your previous comment and I'll accept it as answer asap. – Binkan Salaryman Mar 18 '15 at 09:03
  • 1
    You have the output Pane (F1) (for program output) and the debugger Pane (Ctrl-D) (for gdb output), each one have an output tab. – Jarod42 Mar 18 '15 at 09:56

1 Answers1

1

In 'Settings... -> Build Settings... -> Compiler : Make'

You should have:

make -j 1

And make sure that make is installed on your machine.

Jarod42
  • 203,559
  • 14
  • 181
  • 302