ok, thanks a lot cdr!
i could now compile the project. but(!)..
the outputted file was a helloworld.dll
i now tried to import the .dll with "pd.ex -lib c:/path/to/external/helloworld" (tried wit and without file extesion .dll)
but, what else .... this error followed in pd:
-: can't load library load_object: Symbol "helloworld_setup" not found c:/path/to/external/helloworld: can't load library
and now?
the helloworld setup function is in the sourcefile. may this cause by a wrong compiled dll? or did i do something wrong at the importing?
top error snipped, but be sure to send -DNT (or -DMSW) to the preprocessor
[Linker error] undefined reference to
post' [Linker error] undefined reference to
pd_new' [Linker error] undefined reference togensym' [Linker error] undefined reference to
class_new' [Linker error] undefined reference to `class_addbang' ld returned 1 exit status [Build Error] [obj.dll] Error 1i don't know what i can do next...
the linker needs some hints to find libpd, aka pd.dll (or pd.lib with MSVC). you could rename it libpd.dll, then -lpd would work (with GCC), or simply add the path to pd.dll to the linker arguments (absolute path, or relative if you did -Lbin/)
what kind of project do i have to choose? dll? console?
dll..
should i do it better in visual c++?
if you are using MSVC you additionally have to -DPD_EXTERNAL and weird tricks with declspec(dllimport) or something, so GCC is definitely simpler from a user standpoint..and if you are using GCC, add -mms-bitfields to the compiler flags so your external wont segfault when running in a MSVC-compiled host..
goodluck, looking forward to yer externals..
mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
.: monsular :. wrote:
ok, thanks a lot cdr!
i could now compile the project. but(!)..
the outputted file was a helloworld.dll
i now tried to import the .dll with "pd.ex -lib c:/path/to/external/helloworld" (tried wit and without file extesion .dll)
but, what else .... this error followed in pd:
-: can't load library load_object: Symbol "helloworld_setup" not found c:/path/to/external/helloworld: can't load library
and now?
the helloworld setup function is in the sourcefile. may this cause by a wrong compiled dll? or did i do something wrong at the importing?
PD found the dll but couldn't find the setup function. Probably you need to put __declspec(dllexport) in front of the declaration of helloworld_setup so that the name will be made visible to programs that load helloworld.dll.
Like this: __declspec(dllexport) void helloworld_setup(void)
Martin
1000 Dank!!
after putting __declspec(dllexport) void helloworld_setup(void) before the setup function, it worked fine!
now i can bang a hello world, and it makes me lucky! ;-)
thanks to cdr and martin best regards!
metin
PD found the dll but couldn't find the setup function. Probably you need to put __declspec(dllexport) in front of the declaration of helloworld_setup so that the name will be made visible to programs that load helloworld.dll.
Like this: __declspec(dllexport) void helloworld_setup(void)
Martin
On Thu Mar 09, 2006 at 11:26:27PM +0100, .: monsular :. wrote:
ok, thanks a lot cdr!
i could now compile the project. but(!)..
the outputted file was a helloworld.dll
i now tried to import the .dll with "pd.ex -lib c:/path/to/external/helloworld" (tried wit and without file extesion .dll)
but, what else .... this error followed in pd:
-: can't load library load_object: Symbol "helloworld_setup" not found c:/path/to/external/helloworld: can't load library
and now?
the helloworld setup function is in the sourcefile. may this cause by a wrong compiled dll? or did i do something wrong at the importing?
try just 'pd -lib helloworld'. and make sure helloworld is in PD's search path. if you compiled with MSVC you have to do somethign to export helloworld_setup too. check the archives for that..
top error snipped, but be sure to send -DNT (or -DMSW) to the preprocessor
[Linker error] undefined reference to
post' [Linker error] undefined reference to
pd_new' [Linker error] undefined reference togensym' [Linker error] undefined reference to
class_new' [Linker error] undefined reference to `class_addbang' ld returned 1 exit status [Build Error] [obj.dll] Error 1i don't know what i can do next...
the linker needs some hints to find libpd, aka pd.dll (or pd.lib with MSVC). you could rename it libpd.dll, then -lpd would work (with GCC), or simply add the path to pd.dll to the linker arguments (absolute path, or relative if you did -Lbin/)
what kind of project do i have to choose? dll? console?
dll..
should i do it better in visual c++?
if you are using MSVC you additionally have to -DPD_EXTERNAL and weird tricks with declspec(dllimport) or something, so GCC is definitely simpler from a user standpoint..and if you are using GCC, add -mms-bitfields to the compiler flags so your external wont segfault when running in a MSVC-compiled host..
goodluck, looking forward to yer externals..
mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list