Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I need clarification on limitations of integrating C++ with Obj C



Hi,

I'm trying to build an Obj C file... but it includes header files which are
C++ header files.  If I set the source file type to sourcecode.cpp.objcpp
it compiles fine.

The only problem with that, is that I cannot make this object a NIB
object, because of the stupid restriction that NIB objects cannot
have any C++ code in it at all,  but does that also mean the NIB
object cannot even include C++ files?

This object I call AudTransport does not have ANY C++ Calls or
references to C++ objects, but it does have a reference to
an Objective C Class which is kind of like a Bridge to bridge over
into a module that has both Objective C and C++ in it.

I call this the RTPSessionBridge, and it's a .mm file.  Containing
both Objective C and C++.

Because the AudTransport has to reference an RTPSessionBridge object,
I'm forced to have to #include RTPSessionBridge.h and this one then
includes the C++ headers relating to the C++ calls it has to make.

Now,  when I try and change the sourcecode file type of the AudTransport
into a pure Objective C file,  I get more then 2221 errors...  for instance
my first error is where it can't find a file deep within the C++ file where
it gags when it gets to....   #include <string>

The error I get is:  string: no such file or directory...

The header files in each of the C++ files are of type 'sourcecode.cpp.h'
I tried changing them to other file types and nothing seems to work.

Can someone on this list explain to me what's going on?  Is there a fix....

John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.