g++ default #include's

Discussion in 'C++' started by Nafai, Feb 4, 2005.

  1. Nafai

    Nafai Guest

    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.
    Nafai, Feb 4, 2005
    #1
    1. Advertising

  2. Nafai

    msalters Guest

    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
    msalters, Feb 4, 2005
    #2
    1. Advertising

  3. Nafai

    Efrat Regev Guest

    "Nafai" <> wrote in message
    news:hKHMd.147356$...
    > 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
    Efrat Regev, Feb 4, 2005
    #3
  4. Nafai

    Nafai Guest

    Efrat Regev escribió:
    > "Nafai" <> wrote in message
    > news:hKHMd.147356$...
    >
    >>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?
    Nafai, Feb 4, 2005
    #4
  5. Nafai

    Shezan Baig Guest

    Nafai wrote:
    > Efrat Regev escribió:
    > > "Nafai" <> wrote in message
    > > news:hKHMd.147356$...
    > >
    > >>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-
    Shezan Baig, Feb 4, 2005
    #5
  6. Nafai

    Shezan Baig Guest

    Shezan Baig wrote:
    > Nafai wrote:
    > > Efrat Regev escribió:
    > > > "Nafai" <> wrote in message
    > > > news:hKHMd.147356$...
    > > >
    > > >>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-
    Shezan Baig, Feb 4, 2005
    #6
  7. Nafai

    Default User Guest

    Efrat Regev wrote:
    > "Nafai" <> wrote in message
    > news:hKHMd.147356$...
    > > 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
    Default User, Feb 4, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Danny Anderson
    Replies:
    5
    Views:
    495
    Victor Bazarov
    Aug 15, 2003
  2. Rolf Magnus
    Replies:
    2
    Views:
    599
    Karl Heinz Buchegger
    Nov 28, 2003
  3. Elie Nader
    Replies:
    1
    Views:
    635
  4. Aguilar, James
    Replies:
    2
    Views:
    685
    Aguilar, James
    Jul 16, 2004
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    903
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page