<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 17, 2017 at 10:11 AM, Derek Kwan <span dir="ltr"><<a href="mailto:derek.x.kwan@gmail.com" target="_blank">derek.x.kwan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-:148" class="gmail-a3s gmail-aXjCH gmail-m15adb887e82424e1">so we only want to<br>
build including the ifdeffed code for use with pd-vanilla.</div></blockquote></div><br></div><div class="gmail_extra">Yes, that's all good and fine, but you're doing it wrong. As I said, you must use:<br><br></div><div class="gmail_extra">#ifndef PDL2ORK<br>...<br></div><div class="gmail_extra">#endif<br><br></div><div class="gmail_extra">or:<br><br><div class="gmail_extra">#if !defined(PDL2ORK)<br>...<br></div>#endif<br><br></div><div class="gmail_extra">for sections of code that should be excluded when compiling for Pd-l2ork. This:<br></div><div class="gmail_extra"><br clear="all"><div class="gmail_extra">#if !PDL2ORK<br>...<br></div>#endif<br><br></div><div class="gmail_extra">does *not* work, because PDL2ORK is *just* a defined symbol (i.e., it's defined, but has an empty value), so the above expands to:<br><br><div class="gmail_extra">#if !<br>...<br></div>#endif<br><br></div><div class="gmail_extra">which obviously won't work. (Oddly enough, the above *will* work if the PDL2ORK symbol isn't defined at all, since apparently most C preprocessors will take undefined symbols to denote a zero value in preprocessor expressions. Not sure what the ANSI standard says about this, I'm too lazy to look it up right now.)<br><br>If that doesn't make any sense to you, you need to read up on how #define and #ifdef / #ifndef work. This isn't really explained very well in the GNU cpp manual, since it's "folklore" which every C programmer is supposed to know already. ;-) It's surely explained in the K&R ANSI C book (which is recommended reading for any aspiring C programmer). Anyway, just use #ifndef for the test, then everything will be all right.</div><div class="gmail_extra"><br></div><div class="gmail_extra">HTH,<br></div><div class="gmail_extra">Albert<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr">Dr. Albert Gr"af<br>Computer Music Research Group, JGU Mainz, Germany<br>Email:  <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a><br>WWW:    <a href="https://plus.google.com/+AlbertGraef" target="_blank">https://plus.google.com/+AlbertGraef</a></div></div>
</div></div>