[PD] Please explain Windows compiling once and for all!

IOhannes m zmoelnig zmoelnig at iem.at
Wed Jun 27 14:47:31 CEST 2007


Mark Polesky wrote:
> Hey,

hi.

unfortunately i am not in the position on fullfilling your request, but
i'll give it another "cryptic" try...

> The
> famous external tutorial ( http://iem.at/pd/externals-HOWTO/ ) looks very
> interesting, but it does me no good without knowing how to get from .c to
> .pd ...

the externals howto's examples are checked in at the sourceforge cvs,
they come with a makefile which should be useable on windows too.

> 
> The request is simple: List the steps required (without skipping any!) to
> take the C source file "helloworld.c" and make it into a usable object in
> pd.

haha.

have you tried any online resources: e.g.
http://puredata.info/docs/developer lists at least 2 pages that only
deal with compiling on windows
(http://puredata.info/docs/developer/mingw which basically deals with
compiling pd itself on windows; but once you are there, it is simple;
http://nul.jp/2002/pd_bc deals with compiling externals with the
borland-compiler).

i can give you a step-by-step guide for compiling zexy though (but mind
that this is how i _remember_ it; i will not go and search for a windows
machine with VC installed just to verify each step).

- purchase M$ VC6 (elitarism on my side...:-)) and install it
- get pd
- download zexy (sources!) for free (e.g.
ftp://ftp.iem.at/pub/pd/Externals/ZEXY/)
- extract zexy to you favourite folder
- double-click on the zexy.dsp (or was it zexy.dsw??) in the zexy/src/
folder; this should open VC
- to to the Project->Properties (or however this is called in your
locale) and change the settings to match your setup (mainly these are
the paths to find pd's headers and libraries; you should basically go
through every item in the settings for the "release" and/or "debug"
builds; the most important stuff is in "compiler->preprocessor",
"compiler->path" and "linker->path"
- when you are finished, return to the main project window
- hit "F7" to start the build.
- if you encounter any errors, either the settings are not yet correct
(return to item-6) or the project is a bit out-of-date; the latter
basically means, that the c-files to be included have not been updated;
to fix this, just delete all the c-files from the project file browser
(here this used to be un the left-side of the project-window), then
right click on the folder in the project file browser that used to
contain these files and select "add"; in the openpanel choose all
c-files in zexy/src and hit "OK"
- return to item-8 until you stop getting errors

mind, that you must not use the dll while it is created (best close pd)

if you want step-by-step instructions for vc7, vc2000, vc2006 and
vc3000, please send them to me and i'll give it a go :-) (dev-elitarism
again)


pd comes with some externals (e.g. the foo-stuff, or [fiddle~]) and uses
makefiles to build these.
for this to work, you have to setup your environment correctly:
- first open the makefile (e.g. pd/doc/6.externs/makefile) with your
favourite text-editor and correct all the paths that are wrong
- VC6 came with a vc6vars.bat (ok the name is wrong but something along
these lines; it was a .bat-file which would set your envirnment
variables when run; more modern incarnations might do without the .bat
- open the dosbox (the rest will happen within the dosbox)
- run the vc6vars.bat (or however it is called) if this is needed for
your compiler-incarnation
- cd to your path (e.g. pd/doc/6.externs/)
- run "nmake pd_nt"

if nmake, cl, link cannot be found, you might want to add the paths to
them to your PATH variable.



any more questions?

fmga.dr
IOhannes




More information about the Pd-list mailing list