By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,804 Members | 1,681 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,804 IT Pros & Developers. It's quick & easy.

g++ default #include's

P: n/a
Hello. I'm using a recent version of g++ compiler. It isn't necessary to
type some #include's with this compiler. But sometimes I have to use
older versions of g++ and I get a lot of errors because of not having
typed those #include's. Is there any option for g++ not to put
#include's itself?

Thanks.
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

Nafai wrote:
Is there any option for g++ not to put #include's itself?


That's not a C++ question, but a g++ question. Please ask
in the gnu groups. The FAQ can help you there.

HTH,
Michiel Salters

Jul 23 '05 #2

P: n/a
"Nafai" <na*******@yahoo.es> wrote in message
news:hK********************@telenews.teleline.es.. .
Hello. I'm using a recent version of g++ compiler. It isn't necessary to
type some #include's with this compiler. But sometimes
...


The friendly folk at gnu.gcc.help might help you out
Jul 23 '05 #3

P: n/a
Efrat Regev escribió:
"Nafai" <na*******@yahoo.es> wrote in message
news:hK********************@telenews.teleline.es.. .
Hello. I'm using a recent version of g++ compiler. It isn't necessary to
type some #include's with this compiler. But sometimes
...

The friendly folk at gnu.gcc.help might help you out


I can't find how to do it and I get no response in gnu.gcc.help. Can
anyone help me please?
Jul 23 '05 #4

P: n/a

Nafai wrote:
Efrat Regev escribió:
"Nafai" <na*******@yahoo.es> wrote in message
news:hK********************@telenews.teleline.es.. .
Hello. I'm using a recent version of g++ compiler. It isn't necessary totype some #include's with this compiler. But sometimes
...

The friendly folk at gnu.gcc.help might help you out


I can't find how to do it and I get no response in gnu.gcc.help. Can
anyone help me please?


Look at your compiler documentation to see whether it defines its
version. Then you can do something like:

#ifdef GCC_VERSION < 0x1234566
#include <...>
#endif

I'm not sure what the define symbol is for gcc, but you should be able
to find out from the gcc folks.

Hope this helps,
-shez-

Jul 23 '05 #5

P: n/a

Shezan Baig wrote:
Nafai wrote:
Efrat Regev escribió:
"Nafai" <na*******@yahoo.es> wrote in message
news:hK********************@telenews.teleline.es.. .

>Hello. I'm using a recent version of g++ compiler. It isn't necessary to>type some #include's with this compiler. But sometimes
>...
The friendly folk at gnu.gcc.help might help you out
I can't find how to do it and I get no response in gnu.gcc.help. Can anyone help me please?


Look at your compiler documentation to see whether it defines its
version. Then you can do something like:

#ifdef GCC_VERSION < 0x1234566
#include <...>
#endif

I'm not sure what the define symbol is for gcc, but you should be

able to find out from the gcc folks.

Hope this helps,
-shez-


Correction: Use '#if' instead of '#ifdef'.

-shez-

Jul 23 '05 #6

P: n/a
Efrat Regev wrote:
"Nafai" <na*******@yahoo.es> wrote in message
news:hK********************@telenews.teleline.es.. .
Hello. I'm using a recent version of g++ compiler. It isn't necessary to type some #include's with this compiler. But sometimes
...


The friendly folk at gnu.gcc.help might help you out


More likely gnu.g++.help. Fairly low traffic though.


Brian

Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.