[PD] MinGW + Eclipse + MSWIN helloworld

luca paganotti luca.paganotti at gmail.com
Mon Jul 18 12:12:21 CEST 2011


Hi Hans,

the first option of setting environment/build variables has these effects:

   - Defining build variable PROGRAMFILES inside eclipse doesn't work.
   - It works if I change $(PROGRAMFILES) to $(ProgramFiles) in the make
   file.
   - Obviously it works also if I define PROGRAMFILES in the mingw block of
   the makefile.
   - It works defining PROGRAMFILES=${ProgramFiles} in eclipse project
   preferences/C/C++ Build/Environment.In mingw works as before.

For the second option you gave

changing PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd) to PD_PATH ?=
$(shell cd "$(PROGRAMFILES)"/pd && pwd)
works in eclipse defining an environment variable inside project
preferences/C/C++ Build/Environment as PD_PATH = ${ProgramFiles}/pd.
And it works too running make PD_PATH=/c/Programmi/pd from the mingw shell.

Many thanks.

Ciao



On Fri, Jul 15, 2011 at 5:47 PM, Hans-Christoph Steiner <hans at at.or.at>wrote:

>
> 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:
>
> make PD_PATH=/c/programmi/pd showsetup
>
> .hc
>
> On Jul 15, 2011, at 11:40 AM, luca paganotti wrote:
>
> Hi Hans
>
> running 'make showsetup' from eclipse gives:
>
> **** Build of configuration Default for project mycobject ****
>
> mingw32-make showsetup
> /usr/bin/sh: line 0: cd: /pd: No such file or directory
> /usr/bin/sh: line 0: cd: /pd: No such file or directory
> /usr/bin/sh: line 0: cd: /pd: No such file or directory
> /usr/bin/sh: line 0: cd: /pd: No such file or directory
> CFLAGS: -IC:/Programmi/pd/src -Wall -W -g -DPD -DVERSION='0.0'
> -mms-bitfields -O3 -funroll-loops -fomit-frame-pointer
> LDFLAGS:  -s -shared -Wl,--enable-auto-import
> LIBS:  -L/src/ -L/bin/ -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
> PD_INCLUDE: /include
> PD_PATH:
> objectsdir: /usr/local/lib/pd-externals
> LIBRARY_NAME: mycobject
> LIBRARY_VERSION: 0.0
> SOURCES: mycobject.c
> PDOBJECTS: mypdobject.pd
> ALLSOURCES: mycobject.c
> UNAME: MINGW32_NT-5.1
> CPU: i686
> pkglibdir: /usr/local/lib/pd-externals
> DISTDIR: mycobject-0.0
> ORIGDIR: pd-mycobject_0.0
>
> Running from mingw shell gives:
>
> Pag at XP-PAG /c/dev/c++/pd-externals/mycobject
> $ make showsetup
> CFLAGS: -IC:/Programmi/pd/src -Wall -W -g -DPD -DVERSION='0.0'
> -mms-bitfields -O
> 3 -funroll-loops -fomit-frame-pointer
> LDFLAGS:  -s -shared -Wl,--enable-auto-import
> LIBS:  -L/c/Programmi/pd/src/ -L/c/Programmi/pd/bin/ -lpd -lwsock32
> -lkernel32 -
> luser32 -lgdi32
> PD_INCLUDE: /c/Programmi/pd/include
> PD_PATH: /c/Programmi/pd
> objectsdir: /usr/local/lib/pd-externals
> LIBRARY_NAME: mycobject
> LIBRARY_VERSION: 0.0
> SOURCES: mycobject.c
> PDOBJECTS: mypdobject.pd
> ALLSOURCES: mycobject.c
> UNAME: MINGW32_NT-5.1
> CPU: i686
> pkglibdir: /usr/local/lib/pd-externals
> DISTDIR: mycobject-0.0
> ORIGDIR: pd-mycobject_0.0
>
> Pag at XP-PAG /c/dev/c++/pd-externals/mycobject
> $
>
> hope this helps.
>
> ciao
>
>
>
>
>
>
>
>
> On Fri, Jul 15, 2011 at 5:22 PM, Hans-Christoph Steiner <hans at at.or.at>wrote:
>
>>
>> Ok, I checked in the CC=gcc for MinGW.  For the other two issues,
>> unfortunately its more complicated:
>>
>> On Jul 15, 2011, at 5:06 AM, luca paganotti wrote:
>>
>> mycobject.dll is created by eclipse at the price of defining:
>>
>> *CFLAGS = -I"C:/Programmi/pd/src" -Wall -W -g* in place of *CFLAGS =
>> -I"$(PD_INCLUDE)/pd" -Wall -W -g*
>>
>>
>> The header arrangement has changed 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...
>>
>> *PD_PATH = c:/programmi/pd* in place of *PD_PATH = $(shell cd
>> "$(PROGRAMFILES)"/pd && pwd)*
>>
>>
>> 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.
>>
>> .hc
>>
>>
>> and declaring *CC = gcc*
>>
>>
>>
>>
>>  Perhaps Eclipse sets CFLAGS or LDFLAGS, which is overriding things in
>>> the Makefile?
>>>
>>> About this template, it is oriented around making libraries, so that
>>> includes the meta file for marking the folder as a library.  Setting it
>>> up is simple:
>>>
>>> - rename the template folder to the name of your library
>>> - rename template-meta.pd replacing 'template' with the name you just
>>> used for the folder
>>> - edit Makefile and put the library/folder/meta name in the first
>>> variable, LIBRARY_NAME
>>>
>>> Now you can set library meta data in the meta file, things like version,
>>> authors, etc.
>>>
>>> .hc
>>>
>>
>>
>>
>>
>>
>> ----------------------------------------------------------------------------
>>
>> 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
>>
>>
>>
>
>
>
>
> ----------------------------------------------------------------------------
>
> "Making boring techno music is really easy with modern tools, but with live
> coding, boring techno is much harder." - Chris McCormick
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110718/bb553ff6/attachment.htm>


More information about the Pd-list mailing list