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

lesliekkwu

macrumors newbie
Original poster
Hello all,

I got 1 cpp files and 1 header file, namely xml.cpp and xml.h, which is a xml library. I tried to include in a c++ project in xcode and it is working perfectly.

However, when I include the 2 files into my iphone project, I use the header xml.h in one of my objective c class, I immediately got the follow errors (please see below picture )


Here I attach my source file and the screen cap of my errors. Help off any kind will be highly appreciate. Again, sorry for asking a noob question first !

(Edit: many people has asked me why I don't use the NSXML...I know it is stupid to use another library..but this library allows me to use it on windows mobile too...so please help !!! )
 

Attachments

  • Archive.zip
    Archive.zip
    32.5 KB · Views: 111
  • Picture 2.png
    Picture 2.png
    181.2 KB · Views: 204
Hi,
You need to run your controller file through the Objective-C++ compiler. Rename your file to have a .mm extension. I thnk that will sort out your problem.
b e n
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.