include queue and vector

Discussion in 'Mac Programming' started by arunan, Mar 24, 2009.

  1. macrumors newbie

    #1
    I have a test.mm file that includes the corresponding test.h which in turn has another .h which has
    #include <queue>
    #include <vector>

    When I compile the code it throws an error stating that "No such file found " for both the files .

    I am compiling on GCC 4.0 version.

    Tried the options below:
    1) added using namespace std; after the include statement but still have the same problem
    2) gave the complete path of the queue and vector but it throws further errors with the files included by queue and vector
    3) changed the file extension from .cpp to .mm
    4) Added -ObjC++ the other_cflags option in the build options but still the problem persists.

    Please let me know what the problem could be.

    Thanks,
     
  2. macrumors member

    #2
    Hi,

    ######### t.h #########
    #include <queue>
    #include <vector>


    ######### t.mm #########
    #include "t.h"

    int main(void)
    {
    return -1;
    }
    #######################

    compiles without any problems with the following command line:

    gcc t.mm

    Best regards
    Peter
     

Share This Page