[PD] general questions on externals

IOhannes m zmoelnig zmoelnig at iem.at
Mon Dec 10 09:27:52 CET 2007


altern wrote:
> hi
> 
> The uni i am collaborating with has an engineer that did a image 
> analisys tool on C couple of years ago. Now they want to port parts of 
> it to PD creating an external. The engineer that does the job is 
> checking the documentation about externals but he was getting some error.
> 
> He doesnt have internet at home, doesnt like it. And does not use email 
> much, on top of this he does not speak english ... :( so this might end 
> up like japanese whispers ...
> 
> As far as I understood he was trying to do a "hello world" example and 
> was able to compile but the PD was not able to create the object despite 
> of being placed into a folder within the PD path. He is using Visual 
> Studio to compile. He was checking Flext as well. He was confused and he 
> was asking which is the best way to go about creating externals under 
> windows. I think he is using Visual Studio to compile.

the externals-howto (if he is referring to that) is pretty complete as 
far as it goes to writing externals.
it does say nothing about compiling externals though.

most likely this is the problem your engineer is experiencing.

so here some tips:

- they should have a look at the makefiles for the externals that come 
with Pd (pd/extra/makefile), it has a relevant esection for building 
with M$VC (but only using commandline tools)

- alternatively, the examples of my externals-HOWTO are also checked 
into CVS (./doc/tutorials/externals-howto/), and there you will find 
Makefiles (still: using cmdline tools, also for M$VC)

- if they insist on building only from within the IDE (no cmdline 
tools), they could also have a look at the M$VC project for zexy. (this 
is shameless self-advertising i admit; but it is the simplest M$VC 
project i know well); just use zexy.dsw / zexy.dsp (or whatever is 
there) and upgrade to their version of M$VC (the IDE should handle this 
automatically); then build from this project (rename the probject; 
remove all files from the project; add your own files)



if they want to create the project on their own:
- an external is a .dll (something you have to tell M$VC pretty early 
when you create a new project)
- the external must link against pd.lib
- an external MUST export one certain function (it MAY export more; but 
this one is obligatory): "void <externalname>_setup(void)"
use
- the external must reside in a file of its name::
   [myobj] (pd objectclass) -> myobj.dll (external-file) -> 
myobj_setup() (entry point)


mfgas.dr
IOhannes




More information about the Pd-list mailing list