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

mainstreetmark

macrumors 68020
Original poster
I'm not very good at C any more, but I do have a project i need to compile on OSX. I'm using XCode4, and have the thing compiling fine in Linux, with gcc. The project uses a third party library, and that library is complaining that i'm not using C++, evidently. Here's the error it's throwing.

#ifndef __cplusplus
# error Must use C++ to compile this module!
#endif

It's also erroring on some C++ specific terms, such as 'class'.

The file has a .hpp extension. I created the project as a C++ project.

Can anyone point me in the right direction?
 
I'm not very good at C any more, but I do have a project i need to compile on OSX. I'm using XCode4, and have the thing compiling fine in Linux, with gcc. The project uses a third party library, and that library is complaining that i'm not using C++, evidently. Here's the error it's throwing.

#ifndef __cplusplus
# error Must use C++ to compile this module!
#endif

In your project, click on the .hpp file, Command-I (Info), click on the "General" tab. Then check the file type.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.