Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: scarphin on November 08, 2010, 02:00:32 pm

Title: About the include folder
Post by: scarphin on November 08, 2010, 02:00:32 pm
Hi,
that'll be a very stupid question probably but I can't see my header files in the include folder which I included in my project. So is that an autonomous process or do I have to manually create an 'include' virtual folder and drop the files into it? I'm using xp sp3 with the debuggers nightly 'svn 6688'. Thnx...
Title: Re: About the include folder
Post by: oBFusCATed on November 08, 2010, 02:59:08 pm
You should add them to the project and if you've not messed with the extensions handling/virtual folders for the current project, they should show up in the "Headers" folder.
Title: Re: About the include folder
Post by: scarphin on November 08, 2010, 04:00:04 pm
Ok I got it now. Just thinking wouldn't it be better if 'codeblocks' could add the '#include'd files automatically? At least an option to do so? ;)
Title: Re: About the include folder
Post by: oBFusCATed on November 08, 2010, 06:10:54 pm
Include files for what?

There is a way to add files recursively, what more do you want?
Title: Re: About the include folder
Post by: scarphin on November 08, 2010, 06:58:37 pm
I mean the addition of the '#include'd files in the source to the header directory automatically. But never mind I guess it's just a silly idea.
Title: Re: About the include folder
Post by: Jenna on November 08, 2010, 07:10:13 pm
I mean the addition of the '#include'd files in the source to the header directory automatically. But never mind I guess it's just a silly idea.

You mean moving the files on harddisk ?

That's really a silly idea.
What shall happen with the sstem headers or third-party headers ?

If you mean to move newly created headers to a special directory, there should be no need to do so, C::B asks you for the full name (including the path) of the header to be created.
Title: Re: About the include folder
Post by: scarphin on November 08, 2010, 09:24:11 pm
Sorry my bad! By 'header directory' I mean the 'header' listed near 'sources' on the 'management' window under the 'projects' tab not any actual directory. What I'm trying to say is to automate the process below:
You should add them to the project and if you've not messed with the extensions handling/virtual folders for the current project, they should show up in the "Headers" folder.
Title: Re: About the include folder
Post by: MortenMacFly on November 09, 2010, 03:08:17 am
What I'm trying to say is to automate the process below:
You should add them to the project and if you've not messed with the extensions handling/virtual folders for the current project, they should show up in the "Headers" folder.
I still don't get it: What do you want to automise here? At some point you'll need to setup the include files. That is a single operation as described by oBFusCATed:
There is a way to add files recursively, what more do you want?
.
So you want to automise what is already a single operation?
Title: Re: About the include folder
Post by: scarphin on November 09, 2010, 05:05:09 pm
I apologize for my English, I'm not a native English speaker. I'll try to explain in greater detail. Say I have the beginning of a source file like below:
Code
#include <inttypes.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include "lcd.h"
I've seen this in a commercial IDE with compiler integrated. When I hit the compile for the first time every file included (in this case inttypes.h, avr/io.h, avr/pgmspace.h, lcd.h) and the files they include inside them get listed under the 'header' title or related titles in a window similar to the 'management' window in codeblocks. So when I need to look up a function which resides in say 'lcd.h', I just double click the 'lcd.h' file under the 'header' title and it's opened in a new tab in the editor where currently in codeblocks I need to add the 'lcd.h' file to the project or load it manually to achieve the same result. That was something I found very practical at the time and just wanted to share with u devs in case u also might think it may be of use.
If I'm still unclear then just ignore what I said cuz I think codeblocks even in its current state is above many other software that can only be afforded with money!
Title: Re: About the include folder
Post by: oBFusCATed on November 09, 2010, 05:43:46 pm
Have you tried to right click on "#include <someheader.h>", then open header 'someheader.h'?
Title: Re: About the include folder
Post by: scarphin on November 09, 2010, 06:29:00 pm
Have you tried to right click on "#include <someheader.h>", then open header 'someheader.h'?
Well that saved the day! ;)