hi
i was asking about creating an external on windows few weeks ago, here i am again, now i have detailed info about the error the engineer from my uni is getting. He says he is using microsoft dev estydio 6.0 and pd.lib library to try to compile the "hello world" example. The source code is
#include <m_pd.h> static t_class *helloworld_class; typedef struct _helloworld { t_object x_obj; } t_helloworld; void helloworld_bang(t_helloworld *x) { post("Hello world !!"); } void *helloworld_new(void) { t_helloworld *x = (t_helloworld *)pd_new(helloworld_class); return (void *)x; } void helloworld_setup(void) { helloworld_class = class_new(gensym("helloworld"), (t_newmethod)helloworld_new, 0, sizeof(t_helloworld), CLASS_DEFAULT,(t_atomtype)0); // He tenido que hacer este para que el compilador no me de error class_addbang(helloworld_class, helloworld_bang); }
he does not get error but some warnings when compiling:
compiling... hello.cpp C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(71) : warning C4091: 'extern ' : ignored on left of 'struct _array' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(141) : warning C4091: 'extern ' : ignored on left of 'struct _class' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(144) : warning C4091: 'extern ' : ignored on left of 'struct _outlet' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(147) : warning C4091: 'extern ' : ignored on left of 'struct _inlet' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(150) : warning C4091: 'extern ' : ignored on left of 'struct _binbuf' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(153) : warning C4091: 'extern ' : ignored on left of 'struct _clock' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(156) : warning C4091: 'extern ' : ignored on left of 'struct _outconnect' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(159) : warning C4091: 'extern ' : ignored on left of 'struct _glist' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(381) : warning C4091: 'extern ' : ignored on left of 'struct _widgetbehavior' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(384) : warning C4091: 'extern ' : ignored on left of 'struct _parentwidgetbehavior' when no variable is declared C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\m_pd.h(571) : warning C4091: 'extern ' : ignored on left of 'struct _garray' when no variable is declared Linking... LINK : warning LNK4089: all references to "pd.dll" discarded by /OPT:REF helloworld.dll - 0 error(s), 12 warning(s)
He is worroed about this warning LINK : warning LNK4089: all references to "pd.dll" discarded by /OPT:REF q
He does not know what that means
Once the dll is created he places it in the right location, tries to instantiate it on pd and he gets :
helloworld ... couldn't create
thats all info I could get from him, thanks for any help.
enrike