PDA

View Full Version : include queue and vector




arunan
Mar 25, 2009, 01:43 AM
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,



pstoehr
Mar 25, 2009, 03:59 AM
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