This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: RES: RES: It's possible to use folder/file path for #define (like is possible to use folder/file path into #indude statement) ? If yes, why ?
- From: John Love-Jensen <eljay at adobe dot com>
- To: Luiz Eduardo Gualti <luiz dot gualti at am dot unisal dot br>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Mon, 13 Mar 2006 13:34:25 -0600
- Subject: Re: RES: RES: It's possible to use folder/file path for #define (like is possible to use folder/file path into #indude statement) ? If yes, why ?
Hi Luiz,
> Please, it would have some reason to use define folders ?
Often, a #define is used to specify one of:
+ a constant
+ a macro function
+ a header guard
+ an assert that can be compiled out in release code
+ a feature exclusion trigger (stubs out the feature)
I'm not 100% sure what you mean by "use define folders", but I think that
the answer is: no, #define's are not normally used to define folders.
Folders (or directories) are created with the mkdir command, or in a GUI,
with whatever metaphor the GUI uses to create a folder. For instance, OS X
uses Command-Shift-N key sequnce, or File > New Folder from the menu system,
in the Finder. Whereas Apple ProDOS uses CREATE folder,DIR (defaults to
,DIR if type is omitted).
> These foldes can be used in GCC ?
No, the folders have to be pre-existing. The pre-existing directories can
be accessed using relative paths in the #include statements, or by using the
compilation switch -I to specify where header files are located.
> Please, do you know any C/C++ (C preprocessor itself) forum for begginers ?
None which with I am familiar, that I could recommend. I've been
programming in C from 1985-1990, and in C++ from 1990 on -- so I haven't had
much exposure to beginner forums for C and C++.
Google knows all.
And although some may consider this sacrilege, for beginner programmers I
strongly urge Java <java.sun.com> and Eclipse IDE <www.eclipse.org>, rather
than C or C++. In particular, Java 2 SE 5.0u6 (or later), and Eclipse
3.2M5a (or whatever is the latest and greatest milestone pre-release).
Other Java IDEs that I've heard of are NetBeans and IntelliJ IDEA. There
are probably many others, but I'm not familiar with them.
Sincerely,
--Eljay