<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Joe,</span></div><div><br><span></span></div><div><span>Have you thought of using ofxPd?</span></div><div><br><span></span></div><div><span>I'm involved in the creation of an app for the iPhone right now, and we're using ofxPd from Dan Wilcox:</span></div><div><span>https://github.com/danomatika/ofxPd</span></div><div><span>Since Openframeworks is a bunch of C++ wrappers for various libraries, ofxPd adds Pd to the libraries that you can work with in C++.</span></div><div><span>Then you can call the setup function within the xcode build, and your object will work in libpd (i.e. ofxPd) in the app environment.</span></div><div><span>Bear in mind that Apple do not like GnuGPL licensed stuff, so I've created BSD licensed versions of some of my own Pd externals for this project.<br></span></div><div><br></div><div>And the
 app works. We're in the final stages now, so I'll post to the list when it's complete!</div><div>Best,</div><div>Ed<br><span></span></div><div>&nbsp;</div><div>Gemnotes-0.1alpha: Live music notation for Pure Data<br>http://sharktracks.co.uk/<br></div>  <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight: bold;">From:</span></b> Joe White &lt;white.joe4@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> pd-list &lt;pd-list@iem.at&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 26 April 2012, 16:51<br> <b><span style="font-weight: bold;">Subject:</span></b> [PD] [Pd] Compile external with C++ compiler?<br> </font> </div> <br><div id="yiv232180750">Hi all,<div><br></div><div>Thought I might as well ask this here
 because you guys know everything :)</div><div><br></div><div>I'm writing an external to be built into an iOS app that's running Pd. The catch is I need to interface with a C++ library within the external.&nbsp;</div>

<div><br></div><div>The external builds and runs fine if I'm using the C compiler (in Xcode) but I can't access the C++ library functions. If I switch it to compile in C++ (by changing the objective-c file from .m to .mm) then I can use the C++ library functions but it complains that it can't find 'class_addmethod'</div>

<div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <i>'No matching function for call to 'class_addmethod'</i></div><div><br></div><div>I've tried declaring the setup function as C code like Katja <a rel="nofollow" target="_blank" href="http://www.katjaas.nl/pitchshift/soundtouch%7E.html">explains on her site</a>:</div>

<div>







<div class="yiv232180750p1"><span class="yiv232180750s1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extern</span> <span class="yiv232180750s2">"C"</span> <span class="yiv232180750s1">void</span> external_tilde_setup(<span class="yiv232180750s1">void</span>) { }</div><div><div><div>But that still didn't seem to work. I was also going through the list and found <a rel="nofollow" target="_blank" href="http://lists.puredata.info/pipermail/pd-list/2002-02/004485.html">this thread</a>&nbsp;but I'm not sure if it's the right approach. Plus I'm more of an audio guy than programmer :)</div>

<div><br></div><div>Any ideas would be much appreciated.</div><div><br></div><div>Thanks,</div><div>Joe</div><div><br></div>-- <br>Follow me on Twitter @diplojocus<br>
</div></div></div>
</div><br>_______________________________________________<br><a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br> </div> </div>  </div></body></html>