Working with single c files

General questions regarding the usage of CodeLite
artur
CodeLite Curious
Posts: 5
Joined: Sun Mar 14, 2010 1:04 am
Genuine User: Yes
IDE Question: c++
Contact:

Working with single c files

Post by artur »

Hello,
Is that possible to work with single file not a project. I want to be able to debug them, run,build current file and debug. I'm a beginner programmer and I don't need to have project and it is very uncomfortable to work with project because I am able only to run main.c and every think must be in here(I am not able to run single files from project on their own)
Best Regards
Artur
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Working with single c files

Post by eranif »

Ideally you should have a project.

If you don't want to create a project and still be able to compile the C file into an executable, you can define an external tool to compile the file for you
The command for the tool should be something like:

Code: Select all

gcc $(CurrentFileFullPath) -o MyExe 
To debug the executable (MyExe):
Use the 'Quick Debug' option from 'debug -> quick debug' and select the executable that you want to debug - this option allows you to debug programs without the need of a project.

Eran
Make sure you have read the HOW TO POST thread
artur
CodeLite Curious
Posts: 5
Joined: Sun Mar 14, 2010 1:04 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Working with single c files

Post by artur »

Ideally you should have a project.
Ok but if i have a project which lokk like thist
Image
I am able to run only ex1.c and debug this only file not the project?
Thx for help
Best regards
Artur
Post Reply