[PD] compiling helloworld on winXP

cdr ix at replic.net
Thu Mar 9 17:16:18 CET 2006


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 to `gensym' 
>   [Linker error] undefined reference to `class_new' 
>   [Linker error] undefined reference to `class_addbang' 
>   ld returned 1 exit status 
>  [Build Error]  [obj.dll] Error 1 
> 
> i 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..




More information about the Pd-list mailing list