[PD] writing a gem external. was: [GEM] pix_resize eating RAM

Davide Morelli info at davidemorelli.it
Thu Jun 16 14:41:50 CEST 2005

As Georg suggested I am writing a gem external to use multilayer perceptrons 
with images.
I am having some problem linking due to my lack of experience with cpp:

ann_pix_mlp error LNK2019: unresolved external symbol "__declspec(dllimport) 
const ann_pix_mlp::`vftable'" (__imp_??_7ann_pix_mlp@@6B@) referenced in 
function "public: __thiscall ann_pix_mlp::ann_pix_mlp(float,float)" 
(??0ann_pix_mlp@@QAE at MM@Z)
ann_pix_mlp error LNK2019: unresolved external symbol "__declspec(dllimport) 
private: static class ann_pix_mlp * __cdecl ann_pix_mlp::GetMyClass(void *)" 
(__imp_?GetMyClass at ann_pix_mlp@@CAPAV1 at PAX@Z) referenced in function 
"private: static void __cdecl ann_pix_mlp::dimenMessCallback(void 
*,float,float)" (?dimenMessCallback at ann_pix_mlp@@CAXPAXMM at Z)
ann_pix_mlp error LNK2019: unresolved external symbol "__declspec(dllimport) 
public: static void __cdecl ann_pix_mlp::obj_freeCallback(void *)" 
(__imp_?obj_freeCallback at ann_pix_mlp@@SAXPAX at Z) referenced in function 
ann_pix_mlp error LNK2019: unresolved external symbol "__declspec(dllimport) 
public: static void __cdecl ann_pix_mlp::real_obj_setupCallback(struct 
_class *)" (__imp_?real_obj_setupCallback at ann_pix_mlp@@SAXPAU_class@@@Z) 
referenced in function _ann_pix_mlp_setup

I used [pix_resize] as template for my external

I downloaded GEM from cvs and compiled it (but had problems linking, GemLibs 
also downloaded Mesa

then I told my msvc project to use
GLU32.lib (form mesa)

If I tell the preprocessor
it links without problems, but (obviously) this is not the way to go..
(i get dllexport and I need dllimport, pd won't find my *_setup function)

Thank you,

----- Original Message ----- 
From: "Georg Holzmann" <grhPD at gmx.at>
To: "Davide Morelli" <info at davidemorelli.it>
Cc: "PD Lista" <pd-list at iem.at>
Sent: Wednesday, June 15, 2005 12:34 PM
Subject: Re: [PD] [GEM] pix_resize eating RAM

> Hallo!
>> I am trying to resize a live video feed to a very small picture (16x12),
>> extract a list of rgba values from this image and pass the list to 
>> ann_mlp.
> just an idea:
> If you want to process the pixel data in a neural net I think it would be 
> much faster if you write a GEM-external and process the data in C++ with 
> fann (I did something similar a while ago ...), because maybe you'll need 
> a lot of CPU :)
> LG
> Georg

More information about the Pd-list mailing list