Fails to build and execute cpp with no warning, bin bash message

General questions regarding the usage of CodeLite
backclipped
CodeLite Curious
Posts: 1
Joined: Tue Jun 21, 2022 12:58 am
Genuine User: Yes
IDE Question: C++
Contact:

Fails to build and execute cpp with no warning, bin bash message

Post by backclipped »

Ubuntu 22.04 LTS
Codelite 14.0.0

I am trying to get Codelite installed and working and testing with a basic piece of code, placed in main.cpp of my project.

Code: Select all

#include <iostream>

int main() {
	std::cout<<"Hello Testing!"<<std::endl;
	return 0;
}

After using Build > Run > Build & Execute...

In Codelite, the Output View > Build output window shows...

Code: Select all

/bin/sh -c '/usr/bin/make -j8 -e -f  Makefile'
----------Building project:[ Project1 - Debug ]----------
make[1]: Entering directory '/home/[user]/Documents/FirstWorkspace/Project1'
/usr/bin/i686-w64-mingw32-g++  -c  "/home/[user]/Documents/FirstWorkspace/Project1/main.cpp" -g -O0 -std=c++17 -Wall  -o /home/[user]/Documents/FirstWorkspace/Project1/main.cpp.o -I. -I.
/usr/bin/i686-w64-mingw32-g++ -o /home/[user]/Documents/FirstWorkspace/Project1 @"Project1.txt" -L.   -static
make[1]: Leaving directory '/home/[user]/Documents/FirstWorkspace/Project1'
====0 errors, 0 warnings====

codelite-terminal ouput:

Code: Select all

/bin/bash: line 1: /home/[user]/Documents/FirstWorkspace/Project1: Is a directory.
Hit any key to continue...

Two files, main.cpp.o and main.cpp.o.d, are created in the working directory.

-I can't make sense of this terminal output. Why is /bin/bash relevant?
-Why is Codelite failing without any errors?

I can successfully compile the .cpp and run the output file using the following Terminal commands (run from the project folder):

g++ main.cpp
./a

Terminal Ouput: "Hello Testing!"

I can also successfully run the same code lines from a Netbeans project.

What is going on with Codelite, and how do I get this basic piece of code to run?

Last edited by DavidGH on Tue Jun 21, 2022 10:58 am, edited 1 time in total.
Reason: Added code-tags
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Fails to build and execute cpp with no warning, bin bash message

Post by DavidGH »

Hi,

Various thoughts:

I am trying to get Codelite installed and working and testing with a basic piece of code, placed in main.cpp of my project.

What happens if you create a new Workspace and add one of the template projects? Does that compile?

-I can't make sense of this terminal output. Why is /bin/bash relevant?

I don't know. But the 'Is a directory' bit is the sort of thing that happens when there's whitespace in a path. Does [user] have any spaces, or unusual punctuation?

-Why is Codelite failing without any errors?

I'm afraid the build warning/error system isn't perfect.

In Codelite, the Output View > Build output window shows...
...
/usr/bin/i686-w64-mingw32-g++

You're using mingw on ubuntu? Is that intended? I see that, building in a terminal, you just called 'g++'.

BTW, while the official ubuntu codelite version is 14.0, there are unofficial 16.0 packages available here.

Regards,

David

Post Reply