• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
xcode & c++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xcode & c++


  • Subject: xcode & c++
  • From: Livio Isaia <email@hidden>
  • Date: Fri, 02 Mar 2012 18:20:50 +0100

I'm trying to create some c++ classes in an objective-c program, but always receive error
<error: expected '=', ',', ';', 'asm' or '__attribute__' before 'X3DBaseDataObject'>
when compiling.
the header file (where the error appears) starts simply with this:


typedef struct{
    float x, y, z;
}Vertex3;

typedef struct{
    float x, y, z, w;
}Vertex4;

class X3DBaseDataObject {
public:
virtual void destroy();
};
... ... ...

Where am I wrong?
I tried setting the. cpp file to .mm and of type .cpp .objcpp, but still doesn't work.
Also

 #ifdef __cplusplus
extern "C" {
#endif

doesn't help.

Thanks in advance,
best regards,
livio.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: xcode & c++
      • From: Fritz Anderson <email@hidden>
    • Re: xcode & c++
      • From: Luca Ciciriello <email@hidden>
  • Prev by Date: Re: Xcode - An Apple Embarrassment
  • Next by Date: Re: Xcode - An Apple Embarrassment
  • Previous by thread: Re: Xcode 4.3 & distributed builds
  • Next by thread: Re: xcode & c++
  • Index(es):
    • Date
    • Thread