Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

arunan

macrumors newbie
Original poster
Feb 17, 2009
6
0
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,
 
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.