473,474 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

g++ default #include's

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
6 1571

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
"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
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

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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dmiller23462 | last post by:
Here is the code, it's not complete of course....I've been inserting lines as I go to pinpoint the issue.....I understand that the error message I'm getting (#185 Missing Default Property) is...
11
by: The Directive | last post by:
This code will not compiled: In main function: Dot temp = new Dot( *(new Point( 5, 5 )) ); In Dot class: //Constructor with default arguments. Dot::Dot( Point& point= *(new Point( 5, 5...
2
by: Ekim | last post by:
hy, I've got a question according default parameters of functions that are accessed from different files: ---- logging.h ---- void LogTrace(const char* errorLocation, const char* errorInfo =...
9
by: Pierre Senellart | last post by:
The C++ standard states (26.3.2.1), about std::valarray constructors: > explicit valarray(size_t); > > The array created by this constructor has a length equal to the value of > the argument....
25
by: Mike MacSween | last post by:
Yes, I've downloaded and read the FAQ. And searched the archives. I'm just treading a little carefully here because of the caveats about locking myself out of the db forever. Some answers I could...
0
by: WithPit | last post by:
I have some problems with the instantiating new objects. For example I have the following code //Headerfile (Texture1D.h> #pragma once #using <mscorlib.dll> #include <osg/Texture1D> #include...
7
by: howa | last post by:
e.g. #include<iostream> using namespace std; int main() { double *d = new double;
5
by: Diwa | last post by:
Does the "value" type (value as in key-value pair )of "std::map" require a default ctor even if it is not used ? If I comment out Line 1 in the code attached later, i.e remove the default ctor...
7
by: =?Utf-8?B?TWlrZQ==?= | last post by:
I'm building a C# application that uses web services. I have a class with a default constructor, an overloaded constructor, and some web methods. When VS creates the asmx file, it doesn't include...
5
by: * Tong * | last post by:
Hi, I couldn't figure out the answer myself about the default constructor -- does C++ create it by default? If yes, under what circumstances? Actually, I've found out the partial answer myself...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.