<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Hey Luca,</div><div><br></div><div>Thanks for troubleshooting this. &nbsp;I renamed $(PROGRAMFILES) to $(ProgramFiles) in the template Makefile, following your second suggestion. &nbsp;That seems to be the best solution, sound good to you?</div><div><br></div><div><a href="http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/template/Makefile?r1=15153&amp;r2=15164">http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/template/Makefile?r1=15153&amp;r2=15164</a></div><div><br></div><div>.hc</div><br><div><div>On Jul 18, 2011, at 6:12 AM, luca paganotti wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Hans,<br><br>the first option of setting environment/build variables has these effects:<br><ul><li>Defining build variable <span style="font-family: courier new,monospace;">PROGRAMFILES</span> inside eclipse doesn't work.</li> <li>It works if I change <span style="font-family: courier new,monospace;">$(PROGRAMFILES)</span> to <span style="font-family: courier new,monospace;">$(ProgramFiles)</span> in the make file.</li><li>Obviously it works also if I define <span style="font-family: courier new,monospace;">PROGRAMFILES</span> in the mingw block of the makefile.</li> <li>It works defining <span style="font-family: courier new,monospace;">PROGRAMFILES=${ProgramFiles}</span> in eclipse project preferences/C/C++ Build/Environment.In mingw works as before.<br></li></ul>For the second option you gave <br> <br>changing <span style="font-family: courier new,monospace;">PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd &amp;&amp; pwd</span>) to <span style="font-family: courier new,monospace;">PD_PATH ?= $(shell cd "$(PROGRAMFILES)"/pd &amp;&amp; pwd</span>)<br> works in eclipse defining an environment variable inside project preferences/C/C++ Build/Environment as <span style="font-family: courier new,monospace;">PD_PATH = ${ProgramFiles}/pd</span>.<br>And it works too running <span style="font-family: courier new,monospace;">make PD_PATH=/c/Programmi/pd</span> from the mingw shell.<br> <br>Many thanks.<br><br>Ciao<br><br> <br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 5:47 PM, Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at">hans@at.or.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div style="word-wrap:break-word"><div><br></div><div>Arg, that's really annoying. &nbsp;Eclipse seems to strip the ProgramFiles env var from the environment when it runs the build. &nbsp;What if you set the ProgramFiles variable in Eclipse? &nbsp;Another option might be that we change &nbsp;the PD_PATH definition to be assigned with ?= then it can be overridden by setting an env var PD_PATH. &nbsp;This should currently work in Eclipse and the cmd line:</div> <div><br></div><div>make PD_PATH=/c/programmi/pd showsetup</div><div><br></div><div>.hc</div><div><div></div><div class="h5"><br><div><div>On Jul 15, 2011, at 11:40 AM, luca paganotti wrote:</div><br><blockquote type="cite"> Hi Hans<br><br>running 'make showsetup' from eclipse gives:<br><br><span style="font-family:courier new,monospace">**** Build of configuration Default for project mycobject ****</span><br style="font-family:courier new,monospace"> <br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">mingw32-make showsetup </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">/usr/bin/sh: line 0: cd: /pd: No such file or directory</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">/usr/bin/sh: line 0: cd: /pd: No such file or directory</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">/usr/bin/sh: line 0: cd: /pd: No such file or directory</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">/usr/bin/sh: line 0: cd: /pd: No such file or directory</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">CFLAGS: -IC:/Programmi/pd/src -Wall -W -g -DPD -DVERSION='0.0' -mms-bitfields -O3 -funroll-loops -fomit-frame-pointer</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">LDFLAGS:&nbsp; -s -shared -Wl,--enable-auto-import</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">LIBS:&nbsp; -L/src/ -L/bin/ -lpd -lwsock32 -lkernel32 -luser32 -lgdi32</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">PD_INCLUDE: /include</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">PD_PATH: </span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">objectsdir: /usr/local/lib/pd-externals</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">LIBRARY_NAME: mycobject</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">LIBRARY_VERSION: 0.0</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">SOURCES: mycobject.c </span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">PDOBJECTS: mypdobject.pd</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">ALLSOURCES: mycobject.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">UNAME: MINGW32_NT-5.1</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">CPU: i686</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">pkglibdir: /usr/local/lib/pd-externals</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">DISTDIR: mycobject-0.0</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">ORIGDIR: pd-mycobject_0.0</span><br style="font-family:courier new,monospace"><br>Running from mingw shell gives:<br><br><span style="font-family:courier new,monospace">Pag@XP-PAG /c/dev/c++/pd-externals/mycobject</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">$ make showsetup</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">CFLAGS: -IC:/Programmi/pd/src -Wall -W -g -DPD -DVERSION='0.0' -mms-bitfields -O</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">3 -funroll-loops -fomit-frame-pointer</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">LDFLAGS:&nbsp; -s -shared -Wl,--enable-auto-import</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">LIBS:&nbsp; -L/c/Programmi/pd/src/ -L/c/Programmi/pd/bin/ -lpd -lwsock32 -lkernel32 -</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">luser32 -lgdi32</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">PD_INCLUDE: /c/Programmi/pd/include</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">PD_PATH: /c/Programmi/pd</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">objectsdir: /usr/local/lib/pd-externals</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">LIBRARY_NAME: mycobject</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">LIBRARY_VERSION: 0.0</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">SOURCES: mycobject.c</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">PDOBJECTS: mypdobject.pd</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">ALLSOURCES: mycobject.c</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">UNAME: MINGW32_NT-5.1</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">CPU: i686</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">pkglibdir: /usr/local/lib/pd-externals</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">DISTDIR: mycobject-0.0</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">ORIGDIR: pd-mycobject_0.0</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Pag@XP-PAG /c/dev/c++/pd-externals/mycobject</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">$</span><br><br>hope this helps.<br><br>ciao<br><br><br><br><br><br><br> <br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 5:22 PM, Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div style="word-wrap:break-word"><div><br></div><div>Ok, I checked in the CC=gcc for MinGW. &nbsp;For the other two issues, unfortunately its more complicated:</div> <div><br></div><div><div><div>On Jul 15, 2011, at 5:06 AM, luca paganotti wrote:</div> <br><blockquote type="cite"><div>mycobject.dll is created by eclipse at the price of defining:<br><br><b style="font-family:courier new,monospace">CFLAGS = -I"C:/Programmi/pd/src" -Wall -W -g</b> in place of <b style="font-family:courier new,monospace">CFLAGS = -I"$(PD_INCLUDE)/pd" -Wall -W -g</b><br> </div></blockquote><div><br></div></div><div>The header arrangement has change<span style="background-color:transparent">d in 0.43, so now all of the headers are included in&nbsp;$(PD_INCLUDE)/pd. &nbsp;We haven't&nbsp;quite figured out how to handle that everywhere yet tho...</span></div> <div><br><blockquote type="cite"><div><b style="font-family:courier new,monospace">PD_PATH = c:/programmi/pd</b> in place of <b style="font-family:courier new,monospace">PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd &amp;&amp; pwd)</b><br> </div></blockquote><div><br></div></div><div>This little script to set PD_PATH works for me on my MinGW setup. &nbsp;Can you put the old PD_PATH line back in the Makefile and run 'make showsetup' and send me the result? &nbsp;You should see what its setting PD_PATH to. &nbsp;I'd like to get that working automatically.</div> <div><br></div><div>.hc</div><div><br><blockquote type="cite"><div><br>and declaring <b style="font-family:courier new,monospace">CC = gcc</b><br> <br><br><br><br> </div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Perhaps Eclipse sets CFLAGS or LDFLAGS, which is overriding things in<br> the Makefile?<br> <br> About this template, it is oriented around making libraries, so that<br> includes the meta file for marking the folder as a library. &nbsp;Setting it<br> up is simple:<br> <br> - rename the template folder to the name of your library<br> - rename template-meta.pd replacing 'template' with the name you just<br> used for the folder<br> - edit Makefile and put the library/folder/meta name in the first<br> variable, LIBRARY_NAME<br> <br> Now you can set library meta data in the meta file, things like version,<br> authors, etc.<br> <font color="#888888"><br> .hc<br> </font></blockquote></div><br></blockquote></div></div><br> <div> <span style="border-collapse:separate;border-spacing:0px 0px;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word"> <br><div><br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>Terrorism is not an enemy.&nbsp;&nbsp;It cannot be defeated.&nbsp;&nbsp;It's a tactic.&nbsp;&nbsp;It's about as sensible to say we declare war on night attacks and expect we're going to win that war.&nbsp;&nbsp;We're not going to win the war on terrorism. &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;- retired U.S. Army general, William Odom</div> <br></div></span> </div><br></div></blockquote></div><br></blockquote></div><br></div></div><div> <span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word"> <span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div> <br><br></div><div>----------------------------------------------------------------------------</div><div><div><br></div>"Making boring techno music is really easy with modern tools,&nbsp;but with live coding, boring techno is much harder." - Chris McCormick</div> <div><br></div></span><br></span><br></div></span> </div><br></div></blockquote></div><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="font-size: 12px; "><br class="Apple-interchange-newline"></span><span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; - Benjamin Franklin</div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>