Author Topic: About the include folder  (Read 8282 times)

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
About the include folder
« 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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: About the include folder
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: About the include folder
« Reply #2 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? ;)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: About the include folder
« Reply #3 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: About the include folder
« Reply #4 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: About the include folder
« Reply #5 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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: About the include folder
« Reply #6 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: About the include folder
« Reply #7 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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: About the include folder
« Reply #8 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: About the include folder
« Reply #9 on: November 09, 2010, 05:43:46 pm »
Have you tried to right click on "#include <someheader.h>", then open header 'someheader.h'?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: About the include folder
« Reply #10 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! ;)