Page 1 of 1
Can't run .exe files outside of CodeLite
Posted: Tue Jan 04, 2011 5:34 am
by Zer0
Hello,
I'm trying to create a small console app project with only one source file (main.cpp) that will work as a standalone executable that I can run through the terminal without using CodeLite's "Run" command.
I managed to compile and build the project, and I tried double-clicking on the .exe file that appeared in myprojectdir/debug. Unfortunately this does nothing.
Is there something extra I need to do with my project so that the program runs when I click the .exe file?
Thanks.
System Specs:
Running Ubuntu 10.10
Using GNOME Terminal 2.32
Codelite 2.9.0.4684
Re: Can't run .exe files outside of CodeLite
Posted: Tue Jan 04, 2011 1:44 pm
by eranif
Zer0 wrote:Is there something extra I need to do with my project so that the program runs when I click the .exe file?
At first I thought you are using Windows... (.exe)
But then then I saw this:
Zer0 wrote:Running Ubuntu 10.10
Using GNOME Terminal 2.32
Codelite 2.9.0.4684
In that case:
Open a terminal shell and try to run it from the command line - this will tell you the error...
Eran
Re: Can't run .exe files outside of CodeLite
Posted: Fri Jan 07, 2011 12:41 pm
by Zer0
Ok, I opened up a shell in GNOME Terminal and navigated to the Debug folder of the project directory, but when I tried to run my_program.exe, it said that the .exe file wasn't found.
PS: I was using the 'exec' command in GNOME (exec [program/command name]). Is this the correct command to use?
Thank you
Re: Can't run .exe files outside of CodeLite
Posted: Fri Jan 07, 2011 3:09 pm
by DavidGH
Hi,
Either:
1) Open a terminal. Use cd to navigate to the directory holding the binary (if it really
is called my_program.exe, something is seriously wrong with your CodeLite settings
). Then do:
where my_program is the name of the binary. Note that the './' is needed because that dir won't be in your PATH, so the file won't be found otherwise.
Or:
2) Open a terminal. do:
Regards,
David
Re: Can't run .exe files outside of CodeLite
Posted: Fri Jan 07, 2011 9:37 pm
by Zer0
Just to clarify, the file is (or should be) an executable file, but it does not have the file extension '.exe'. I'm simply a former Windows user and I'm used to having that extension on applications.
Also, I tried what you showed me, but I ended up getting an error 'Command not found.'
Re: Can't run .exe files outside of CodeLite
Posted: Sat Jan 08, 2011 12:09 am
by eranif
Can you paste here the *full* output of your build? (rebuild it and paste the output here)
I suspect that the build failed...
Eran
Re: Can't run .exe files outside of CodeLite
Posted: Sat Jan 08, 2011 12:16 am
by Zer0
Ok, here it is:
Code: Select all
----------Build Started--------
/bin/sh -c '"make" -j 2 -f "Hoppity_Hop1.mk" all'
----------Building project:[ Hoppity_Hop1 - Debug ]----------
make: *** No rule to make target `/home/kevin/Documents/codelite projects/Hoppity_Hop/main.cpp', needed by `Debug/main.o'. Stop.
make: *** Waiting for unfinished jobs....
----------Build Ended----------
0 errors, 0 warnings
Re: Can't run .exe files outside of CodeLite
Posted: Sat Jan 08, 2011 4:33 pm
by eranif
As you can see, you dont have any executable... (build failed)
1) Please read the build output
2) I am guessing that the problem can be:
- codelite has no permissions to create the Debug folder
- the SPACE in the folder path ("/home/kevin/Documents/codelite projects/Hoppity_Hop/main.cpp")
Eran
Re: Can't run .exe files outside of CodeLite
Posted: Sun Jan 09, 2011 12:42 am
by Zer0
It's not the space, I changed it to an underscore and it still has problems. Also, there is already a debug folder with the executable file and the object file.
I cleaned and then built the project and then the workspace. This is the build info I got:
Code: Select all
----------Build Started--------
/bin/sh -c '"make" -j 2 -f "Hoppity_Hop1.mk" all'
----------Building project:[ Hoppity_Hop1 - Debug ]----------
g++ -c "/home/kevin/Documents/codelite_projects/Hoppity_Hop/main.cpp" -g -o ./Debug/main.o "-I." "-I."
g++ -o ./Debug/Hoppity_Hop1 ./Debug/main.o "-L."
----------Build Ended----------
0 errors, 0 warnings
By the looks of it the build succeeded, but I still can't run the executable files with GNOME terminal.