Hello. IŽm triying to compile a pd dll with several external objects in it. The sample I send attached makes counters.dll which have two pd objects: contador1 and contador2.
The code is very simple, only a sample taken from J. ZmölnigŽs tutorial "How to write pd external objects". The makefile I use for compiling it using MS VC 5 is attached also. It compiles and writes c:/pd/extra/counters.dll But when I run: C:\pd\bin\pd.exe -lib C:\pd\extra\counters I get: load_object: Symbol "counters_setup" not found C:/pd/extra/counters: can't load library
Can anybody point me some makefile sample for this case (just one dll with multiple objects)? And/or if there is some error in the c code as well... Any help will be most appreciated. Isi
Isidro Gonzalez wrote:
Can anybody point me some makefile sample for this case (just one dll with multiple objects)? And/or if there is some error in the c code as well... Any help will be most appreciated.
your problem is not with makefiles but in the C-code. Pd expects (as i think is explained in the HOWTO) a specially named function for every library it loads: <library>_setup() (in your case counters_setup()) which it calls after loading the library.
this setup-function is then used to register the actual object-classes. in your case, you should use the setup-function to call the setup-functions of the objects. something like <code> EXTERN void counters_setup() { contador1_setup(); contador2_setup(); } </code>
fmgdasr IOhannes
PS: isn't all this explained in the HOWTO?