<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>The ProgramFiles var is still useful in a plain Cygwin or MinGW environment. I just checked in an update for both Cygwin and MinGW. It should work now if you just define PROGRAMFILES in Eclipse. There was a problem where $(PROGRAMFILES) was interpretted by make, so "C:\Program Files" turns into "C:Program Files" since make uses / as the path separator. So I replaced $(PROGRAMFILES) with $$PROGRAMFILES so that the var doesn't get evaluated by make but instead only the shell. MinGW understands Windows paths, and for Cygwin, I fixed the use of 'cygpath' to generate a Cygwin path.</div><div><br></div><div>.hc</div><br><div><div>On Jul 26, 2011, at 6:08 AM, luca paganotti wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">... ok, i'm not so fool ...<br><br>the build was running well in this case when I had this configuration:<br><br><span style="font-family: courier new,monospace;">PD_PATH <u><b>?=</b></u> $(shell cd "$(ProgramFiles)"/pd && pwd)</span><br> <br><b>BUT</b> (grrrrr ....) I had a redefinition of PD_PATH inside eclipse as <b><span style="font-family: courier new,monospace;">PD_PATH --> /c/programmi/pd</span></b> in the project preferences/C/C++ Build/Environment, making the presence of $(ProgramFiles) in the makefile totally meaningless !<br> <br>sorry again ...<br><br><br><br><br>On Tue, Jul 26, 2011 at 4:12 AM, Hans-Christoph Steiner <span dir="ltr"><<a href="mailto:hans@at.or.at">hans@at.or.at</a>></span> wrote:<br><div class="gmail_quote"><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>Hey Luca,</div><div><br></div><div>Thanks for troubleshooting this. I renamed $(PROGRAMFILES) to $(ProgramFiles) in the template Makefile, following your second suggestion. 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&r2=15164" target="_blank">http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/template/Makefile?r1=15153&r2=15164</a></div> <div><br></div><div>.hc</div><div><div></div><div class="h5"><br><div><div>On Jul 18, 2011, at 6:12 AM, luca paganotti wrote:</div><br><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 && pwd</span>) to <span style="font-family:courier new,monospace">PD_PATH ?= $(shell cd "$(PROGRAMFILES)"/pd && 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"><<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>></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. Eclipse seems to strip the ProgramFiles env var from the environment when it runs the build. What if you set the ProgramFiles variable in Eclipse? Another option might be that we change the PD_PATH definition to be assigned with ?= then it can be overridden by setting an env var PD_PATH. 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><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: -s -shared -Wl,--enable-auto-import</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">LIBS: -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 </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: -s -shared -Wl,--enable-auto-import</span><br style="font-family:courier new,monospace"> <span style="font-family:courier new,monospace">LIBS: -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"><<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>></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. 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 $(PD_INCLUDE)/pd. We haven't 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 && pwd)</b><br> </div></blockquote><div><br></div></div><div>This little script to set PD_PATH works for me on my MinGW setup. Can you put the old PD_PATH line back in the Makefile and run 'make showsetup' and send me the result? You should see what its setting PD_PATH to. 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. 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. It cannot be defeated. It's a tactic. It's about as sensible to say we declare war on night attacks and expect we're going to win that war. We're not going to win the war on terrorism. - 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, 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></div><div> <span style="font-size:12px"><br></span><span style="font-size:12px"><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> <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. - Benjamin Franklin</div> <br></span></span> </div><br></div></blockquote></div><br></blockquote></div><br><div> <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 style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><br class="Apple-interchange-newline"><div><br></div><div>----------------------------------------------------------------------------</div><div><br style="font-family: Tahoma; "></div><div> ˇEl pueblo unido jamás será vencido!</div><br class="Apple-interchange-newline"></div></span> </div><br></body></html>