Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. [ANSWERED] Include Files
Forum Updated to NodeBB v4.3 + New Features

[ANSWERED] Include Files

Scheduled Pinned Locked Moved C++ Gurus
18 Posts 10 Posters 11.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Taamalus
    wrote on last edited by
    #8

    This code guru, so, my two pennies
    GCC compiler and it's smaller brother MingW which comes with my Qt Creator has this to say about the preprocessor directive #include:
    [quote]
    #include <file>
    This variant is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to this list with the -I option (see Invocation).
    #include "file"
    This variant is used for header files of your own program. It searches for a file named file first in the directory containing the current file, then in the quote directories and then the same directories used for <file>. You can prepend directories to the list of quote directories with the -iquote option. [/quote]
    Therefore, in my case, using Qt Creator with MingW, all none standard headers will be referenced with "..." . A compiler may not necessarily follow the paths as outlined in MSDN, unless I explicitly instruct my compiler to do so. (I am too lazy to do that)

    ... time waits for no one. - Henry

    1 Reply Last reply
    0
    • W Offline
      W Offline
      Wolf P.
      wrote on last edited by
      #9

      Good point, Taamalus.
      C++ standards are sometimes (very) far from our real life.
      The given environment determines the binding documentation, no matter how standards compliant it is.

      This problem is reflected in the acronym "RTFM":http://en.wikipedia.org/wiki/RTFM ;)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #10

        [quote author="Wolf P." date="1294651634"]Good point, Taamalus.
        C++ standards are sometimes (very) far from our real life.
        The given environment determines the binding documentation, no matter how standards compliant it is.

        This problem is reflected in the acronym "RTFM":http://en.wikipedia.org/wiki/RTFM ;)[/quote]
        So, I guess the correct answer to RTFM then, is to ask RWFM?

        (the "W" standing for "Which")

        1 Reply Last reply
        0
        • W Offline
          W Offline
          Wolf P.
          wrote on last edited by
          #11

          For Qt, /I/ havn't read it nor searched for it ;)
          But regarding my current main development environment, I have found that neither I nor my colleagues have read it early enough.

          When working with Qt Creator, you should consult one of the documentations of /MinGW/ or /Visua Studio/, depending on your software installation.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #12

            [quote author="Andre" date="1294653747"][quote author="Wolf P." date="1294651634"]This problem is reflected in the acronym "RTFM":http://en.wikipedia.org/wiki/RTFM ;)[/quote]
            So, I guess the correct answer to RTFM then, is to ask RWFM?

            (the "W" standing for "Which")

            [/quote]

            That of the compiler(s) you use. As far as I know the popular ones tend to behave quite similar on include paths.

            [EDIT: correct quotes]

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Wolf P.
              wrote on last edited by
              #13

              There are two options, right?
              If there are online versions, can anybody post the appropriate links to GCC and MSVC?

              1 Reply Last reply
              0
              • P Offline
                P Offline
                Panke
                wrote on last edited by
                #14

                "GCC Handbook":http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/index.html#Top

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #15

                  Wolf P.: You only use two compilers? You are lucky then!

                  Also note that the behavior of the compiler can change between versions (even though it should not change for fundamental things like include path handling:-).

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #16

                    "MSDN for MSVS":http://msdn.microsoft.com/en-us/library/36k2cdd4(VS.80).aspx

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #17

                      If you have more, please add them to the "Learning/Links and Material":http://developer.qt.nokia.com/wiki/Category:Learning::LinksAndMaterial page of the wiki

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        Wolf P.
                        wrote on last edited by
                        #18

                        [quote author="Tobias Hunger" date="1294679366"]Wolf P.: You only use two compilers? You are lucky then![/quote] How many compilers do you use?
                        BTW: this sounds like a suggestion for one of our next polls ;)

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved