From tom at ntbti.com Tue Mar 20 15:30:23 2012 From: tom at ntbti.com (Tom Laws) Date: Wed Mar 21 05:54:59 2012 Subject: [xsde-users] Does anyone have a working iOS project? Message-ID: I got the binary .a file working in XCode 4 (thanks to Boris), and used the binary to create the hxx and cxx files from my XSD source. I created a new project as-per the readme for iOS, linked to the binary and put in the search path for the xsde headers and included my hxx file. And then I compiled and everything blew up..... First I got about 5 'string' not found errors pointing to #include These were in several files and setting these to string.h and saving seems to have fixed it. Next were several 'iterator' issues of the same type. I set these to iterator.h same as string.h but these ones persist so not sure where I can find iterator.h to include There are dozens more errors like zz/libxsde/xsde/cxx/buffer.hxx:13:1: error: unknown type name 'namespace' [1] namespace xsde and zz/libxsde/xsde/cxx/buffer.hxx:13:15: error: expected ';' after top level declarator [1] namespace xsde I tried instead of my own XSD rendered files using the helloworld example and they likewise blew up. I'm happy to post as many as we need, but I guess what I would really like is a functioning XCode project someone has created I can see where the heck I am going so wrong with things. I noticed on the list before someone has successfully got things working, so is there a place I can pull the actual XCode project from to see it? I would really like to use this library but I'm not sure why I am having such difficulty working with it. Thanks and please let me know what more information is required. From boris at codesynthesis.com Wed Mar 21 09:21:24 2012 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Mar 21 09:16:13 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: Tom Laws writes: > And then I compiled and everything blew up..... > > First I got about 5 'string' not found errors pointing to > > #include > > These were in several files and setting these to string.h and saving > seems to have fixed it. Next were several 'iterator' issues of the > same type. I set these to iterator.h same as string.h but these ones > persist so not sure where I can find iterator.h to include > > There are dozens more errors like > > zz/libxsde/xsde/cxx/buffer.hxx:13:1: error: unknown type name 'namespace' [1] > namespace xsde It looks like your project doesn't compile the files you have added as C++. This is strange since the project for libxsde that you have successfully created does compile them fine. Can you check if there are any settings for individual files in the project that tell XCode what compilation mode (C, C++, Objective-C) should be used? I am also going to try and reproduce this later tonight. BTW, it would be helpful to know which version of XCode you are using. Boris From boris at codesynthesis.com Wed Mar 21 15:41:58 2012 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Mar 21 15:36:42 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: Hi Tom, Boris Kolpackov writes: > I am also going to try and reproduce this later tonight. Ok, I've updated the build instructions for XCode 4 and added them to the Wiki: http://wiki.codesynthesis.com/Using_XSDE_with_iOS_and_XCode_4 I was able to create and build a test application without any problems. Here is what I did: 1. Created a new Utility iOS application. 2. Compiled hello.xsd from examples/cxx/hybrid/hello.xsd as: xsde cxx-hybrid --generate-parser --generate-aggregate hello.xsd 3. Copied the resulting *.cxx and *.hxx files to the project's directory and added them to the project. 4. Followed the instructions on the above page to link to libxsde. 5. Built the application without any problems. All this using XCode 4.2. I can send you the project if you still want it. Boris From Vaughan at Roberts.name Wed Mar 21 18:32:06 2012 From: Vaughan at Roberts.name (Vaughan Roberts) Date: Wed Mar 21 18:32:18 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: <004601cd07b2$72446330$56cd2990$@Roberts.name> Tom, James Sutton and I have both got an iOS version of xsde working (and maybe others as well). In Xcode 4.2 or later Boris' instructions are a little outdated in some of the details. A couple of things I did initially did cause a lot of compilation errors. For example I chose to use xsde as a pre-compiler name so that I could do conditional compilations on different platforms. This caused a bunch of errors because this name overrode the xsde namespace. A second problem was that I was trying to compile my code using c++0x std lib, whereas I had used the older stdlib when building libxsde. Best regards, Vaughan Mob: 0412 122 362 -----Original Message----- From: xsde-users-bounces@codesynthesis.com [mailto:xsde-users-bounces@codesynthesis.com] On Behalf Of Boris Kolpackov Sent: Thursday, 22 March 2012 0:21 To: Tom Laws Cc: xsde-users Subject: Re: [xsde-users] Does anyone have a working iOS project? Tom Laws writes: > And then I compiled and everything blew up..... > > First I got about 5 'string' not found errors pointing to > > #include > > These were in several files and setting these to string.h and saving > seems to have fixed it. Next were several 'iterator' issues of the > same type. I set these to iterator.h same as string.h but these ones > persist so not sure where I can find iterator.h to include > > There are dozens more errors like > > zz/libxsde/xsde/cxx/buffer.hxx:13:1: error: unknown type name > 'namespace' [1] namespace xsde It looks like your project doesn't compile the files you have added as C++. This is strange since the project for libxsde that you have successfully created does compile them fine. Can you check if there are any settings for individual files in the project that tell XCode what compilation mode (C, C++, Objective-C) should be used? I am also going to try and reproduce this later tonight. BTW, it would be helpful to know which version of XCode you are using. Boris -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5360 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20120322/10f2d76a/smime.bin From tom at ntbti.com Wed Mar 21 19:26:00 2012 From: tom at ntbti.com (Tom Laws) Date: Thu Mar 22 05:17:17 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: Hi Boris Thank you so much for taking a look and I apologise for not sending my exact version of Xcode before. I am using 4.2 Build 4C199. I will try the new instructions you posted once I get home but I would very much like the project you created. I am fairly new to iOS and I'm sure its something incredibly easy I am doing wrong so looking at an actual working project instance would be great. On Wed, Mar 21, 2012 at 12:41 PM, Boris Kolpackov wrote: > Hi Tom, > > Boris Kolpackov writes: > >> I am also going to try and reproduce this later tonight. > > Ok, I've updated the build instructions for XCode 4 and added them > to the Wiki: > > http://wiki.codesynthesis.com/Using_XSDE_with_iOS_and_XCode_4 > > I was able to create and build a test application without any problems. > Here is what I did: > > 1. Created a new Utility iOS application. > > 2. Compiled hello.xsd from examples/cxx/hybrid/hello.xsd as: > > ? xsde cxx-hybrid --generate-parser --generate-aggregate hello.xsd > > 3. Copied the resulting *.cxx and *.hxx files to the project's > ? directory and added them to the project. > > 4. Followed the instructions on the above page to link to libxsde. > > 5. Built the application without any problems. > > All this using XCode 4.2. I can send you the project if you still > want it. > > Boris From tom at ntbti.com Wed Mar 21 22:56:49 2012 From: tom at ntbti.com (Tom Laws) Date: Thu Mar 22 05:17:18 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: This is driving me crazy! I know i am oh-so-close to getting this. Thank you for the guide update Boris. I followed it and compiled (after removing the driver.cxx file). I then added the hello example files, included them in the app delegate.....and the exact same error of 'string file not found' pointing to the include in the hello.hxx header files. I read somewhere the LLVM compiler is far more strict and requires proper namespacing so I tried adding "using namespace std;" in several places (like the hello.hxx file, the appdelegate.h file and even created a dedicated .h file with that as a single line) and that threw errors of "Unknown type name 'using' along with the rest of the string errors. Sooooo close.....so yes Boris if you have your working project I would be thrilled to see where I am going wrong trying to get Objective-C and C++ files working together. On Wed, Mar 21, 2012 at 4:26 PM, Tom Laws wrote: > Hi Boris > > Thank you so much for taking a look and I apologise for not sending my > exact version of Xcode before. I am using 4.2 Build 4C199. > > I will try the new instructions you posted once I get home but I would > very much like the project you created. I am fairly new to iOS and I'm > sure its something incredibly easy I am doing wrong so looking at an > actual working project instance would be great. > > On Wed, Mar 21, 2012 at 12:41 PM, Boris Kolpackov > wrote: >> Hi Tom, >> >> Boris Kolpackov writes: >> >>> I am also going to try and reproduce this later tonight. >> >> Ok, I've updated the build instructions for XCode 4 and added them >> to the Wiki: >> >> http://wiki.codesynthesis.com/Using_XSDE_with_iOS_and_XCode_4 >> >> I was able to create and build a test application without any problems. >> Here is what I did: >> >> 1. Created a new Utility iOS application. >> >> 2. Compiled hello.xsd from examples/cxx/hybrid/hello.xsd as: >> >> ? xsde cxx-hybrid --generate-parser --generate-aggregate hello.xsd >> >> 3. Copied the resulting *.cxx and *.hxx files to the project's >> ? directory and added them to the project. >> >> 4. Followed the instructions on the above page to link to libxsde. >> >> 5. Built the application without any problems. >> >> All this using XCode 4.2. I can send you the project if you still >> want it. >> >> Boris From tom at ntbti.com Thu Mar 22 02:41:29 2012 From: tom at ntbti.com (Tom Laws) Date: Thu Mar 22 05:17:18 2012 Subject: [xsde-users] Does anyone have a working iOS project? In-Reply-To: References: Message-ID: Think I figured it out. I had wrapped everything in a .m file and then I had the eureka moment and changed the extension to .mm as I had read and voila......no errors compiling. So I'll try bridging the hello world example but I think I've got the compiling issues. If anyone does still have a working example of bridging to an iPhone app I'd live to see one. Thank you so much for the help Boris. Your patience with a noob is very much appreciated! On Mar 21, 2012 7:56 PM, "Tom Laws" wrote: > This is driving me crazy! I know i am oh-so-close to getting this. > > Thank you for the guide update Boris. I followed it and compiled > (after removing the driver.cxx file). I then added the hello example > files, included them in the app delegate.....and the exact same error > of 'string file not found' pointing to the include in the > hello.hxx header files. I read somewhere the LLVM compiler is far more > strict and requires proper namespacing so I tried adding "using > namespace std;" in several places (like the hello.hxx file, the > appdelegate.h file and even created a dedicated .h file with that as a > single line) and that threw errors of "Unknown type name 'using' along > with the rest of the string errors. > > Sooooo close.....so yes Boris if you have your working project I would > be thrilled to see where I am going wrong trying to get Objective-C > and C++ files working together. > > On Wed, Mar 21, 2012 at 4:26 PM, Tom Laws wrote: > > Hi Boris > > > > Thank you so much for taking a look and I apologise for not sending my > > exact version of Xcode before. I am using 4.2 Build 4C199. > > > > I will try the new instructions you posted once I get home but I would > > very much like the project you created. I am fairly new to iOS and I'm > > sure its something incredibly easy I am doing wrong so looking at an > > actual working project instance would be great. > > > > On Wed, Mar 21, 2012 at 12:41 PM, Boris Kolpackov > > wrote: > >> Hi Tom, > >> > >> Boris Kolpackov writes: > >> > >>> I am also going to try and reproduce this later tonight. > >> > >> Ok, I've updated the build instructions for XCode 4 and added them > >> to the Wiki: > >> > >> http://wiki.codesynthesis.com/Using_XSDE_with_iOS_and_XCode_4 > >> > >> I was able to create and build a test application without any problems. > >> Here is what I did: > >> > >> 1. Created a new Utility iOS application. > >> > >> 2. Compiled hello.xsd from examples/cxx/hybrid/hello.xsd as: > >> > >> xsde cxx-hybrid --generate-parser --generate-aggregate hello.xsd > >> > >> 3. Copied the resulting *.cxx and *.hxx files to the project's > >> directory and added them to the project. > >> > >> 4. Followed the instructions on the above page to link to libxsde. > >> > >> 5. Built the application without any problems. > >> > >> All this using XCode 4.2. I can send you the project if you still > >> want it. > >> > >> Boris >