MinGW Include order

This is a discussion on MinGW Include order within the Tech Board forums, part of the Community Boards category; Help me decide on the includes order for a MinGW implementation. The following is the current order: C:\MinGW\lib\gcc\mingw32.4.5\include\ C:\MinGW\include\c++.4.5\backward\ C:\MinGW\include\c++.4.5\mingw32\ ...

  1. #1
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,406

    MinGW Include order

    Help me decide on the includes order for a MinGW implementation. The following is the current order:

    C:\MinGW\lib\gcc\mingw32\3.4.5\include\
    C:\MinGW\include\c++\3.4.5\backward\
    C:\MinGW\include\c++\3.4.5\mingw32\
    C:\MinGW\include\c++\3.4.5\
    C:\MinGW\include\
    Is this order correct?

    I'm particularly curious as to the first and second entries. What exactly are the includes therein for? I can't find any documentation on it anywhere.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The first contains the c++ standard library headers. The second contains the non-standard c++ headers that presumably everyone used before the standard came into effect. I assume the second is for backward compatibility, particularly given the directory name.

    The 3.4.5. refers to the version, as I'm sure you're aware; I have 3.4.2 in there as well and once more I suspect this is for backward compatibility.

    The main include directory contains the winapi stuff.

    Since there's unlikely to be a conflict between winapi and the 'latest' manifestation of the standard library headers, which I assume you'd prefer using, the include paths look good to me.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,406
    I too have 3.4.2 there. I removed them from the includes list recently because I don't expect much thrid-party 3.4.2 specific code to make its way into my machine.

    I have the stlport on top of it all, where I believe it should be, correct?

    Also have you checked the readme file inside the first entry (C:\MinGW\lib\gcc\mingw32\3.4.5\include\)? I cannot make sense of it.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Oops - I was looking in the wrong place for the first one in your include path; that one looks to contain c99 headers. I hadn't noticed the 'readme' before (shame on me, but I tend to skim these things, too, unless there's a pressingly urgent reason to do otherwise) but, having skimmed it (inevitably) it doesn't seem to be much to worry about; presumably a search will turn up more information regarding the 'fixmeincludes process' and the exact nature of the non-critical 'collateral inconvenience' referred to.

    If your application uses stlport then its path should be first in the include path as you're doing, otherwise omit or, at least shift it to after the mingw standard c++ header include path.

    If you've not already subscribed to the mingw-users mailing list then I'd like to recommend that you do so as I think you would find it a useful source of information and dialogue.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,406
    Thanks a bunch Ken.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. debug assertion failed!
    By chintugavali in forum C Programming
    Replies: 4
    Last Post: 12-11-2007, 05:23 AM
  3. 2d game
    By JordanCason in forum Game Programming
    Replies: 5
    Last Post: 12-08-2007, 09:08 PM
  4. MFC include BS
    By VirtualAce in forum Windows Programming
    Replies: 4
    Last Post: 10-31-2005, 11:44 AM
  5. dont konw what to do next.
    By negevy in forum C Programming
    Replies: 29
    Last Post: 09-09-2005, 03:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21