Headers folder in project

General questions regarding the usage of CodeLite
mjay4
CodeLite Curious
Posts: 1
Joined: Fri Dec 23, 2016 12:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Headers folder in project

Post by mjay4 »

I'm very new to programming - having only done some primary tasks in Python and Java. The CodeLite FAQ seems to indicate that when I create a project, I should have a "Source" folder and a "Header" folder - but I see only a "src" folder, which I am assuming refers to the source folder. Is it okay to put all files, including headers, inside the source folder?

Thank you for any help.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Headers folder in project

Post by eranif »

mjay4 wrote:Is it okay to put all files, including headers, inside the source folder?
Yes
Make sure you have read the HOW TO POST thread
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Headers folder in project

Post by Gibbon1 »

One thing to note the workspace folders in codelite of 'virtual' they don't actually anything to do with how the files are laid out on disk. That said the compiler needs to be able to find the header files.

The three ways you can do this is

1. All the source and headers files in one directory.
2. Include the path like this #include "subfolder/header.h"
3. Under the project settings->compiler->Include Paths you can set the include paths to be passed to the compiler

See attached png file for an example.
You do not have the required permissions to view the files attached to this post.
Post Reply