Hi all,
when I try to compile the pool external I get the following error:
g++ -c -O2 -DFLEXT_SYS=2 -I/usr/local/lib source/pool.cpp -o pd-linux/pool.o source/pool.cpp: In member function `BL pooldir::LdDirXML(std::istream&, int, bool)': source/pool.cpp:866: no matching function for call to `pooldir::LdDirXMLRec( std::basic_istream<char, std::char_traits<char> >&, I&, BL&, flext_single::AtomList)' source/pool.cpp:719: candidates are: BL pooldir::LdDirXMLRec(std::istream&, int, bool, flext_single::AtomList&) make: *** [pd-linux/pool.o] Error 1
Which seems pretty strange to me. However I don't know enough C++ to figure out what to do. It almost seems like a typecast is missing but which one and why? This is with gcc 3.2.2 btw
regards
Gerard
Hi Gerard, that's one of those compiler strangenesses.... should work with tomorrow's cvs version nevertheless
best greetings, Thomas
----- Original Message ----- From: "gerard van dongen" gml@xs4all.nl To: "PD-dev" pd-dev@iem.at Sent: Wednesday, August 18, 2004 6:11 PM Subject: [PD-dev] promblem compiling pool
Hi all,
when I try to compile the pool external I get the following error:
g++ -c -O2 -DFLEXT_SYS=2 -I/usr/local/lib source/pool.cpp -o pd-linux/pool.o source/pool.cpp: In member function `BL pooldir::LdDirXML(std::istream&, int, bool)': source/pool.cpp:866: no matching function for call to `pooldir::LdDirXMLRec( std::basic_istream<char, std::char_traits<char> >&, I&, BL&, flext_single::AtomList)' source/pool.cpp:719: candidates are: BL
pooldir::LdDirXMLRec(std::istream&,
int, bool, flext_single::AtomList&)
make: *** [pd-linux/pool.o] Error 1
Which seems pretty strange to me. However I don't know enough C++ to figure out what to do. It almost seems like a typecast is missing but which one and why? This is with gcc 3.2.2 btw
regards
Gerard
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
I figured out the solution to my problem witch was how to output a std::string (std::basic_string) as a symbol.
std::string name = "the symbol to output"; //Create the std::string
const char *c_name = name.c_str ( ); //Convert it to a c_string... note that this is a const variable
outlet_symbol(x->name_out, gensym((char*) c_name)); //Cast the CONST c_string to a c_string and gensym it -----------------------------------
Thomas Ouellet Fredericks wrote:
Hi, I possess very little knowledge of C++ but I need to build a WIN32 PD external based on a third pardy API. My main problem is how do I output a String?
The external is for integration with a sensor system called Ubisense. In the following code snippet, I need to find the name of an Object (the name of a sensor) and output it throught a Pure Data outlet. Would it be easier to use outlet_symbol()? If so how?
if you want to output only one symbol (this reads: 1 single string (which *can* hold spaces but should rather not) then use outlet_symbol() (because that is what it is for)
//PROBLEMS START HERE array<char> namearray = name->ToCharArray() ; //???Convert the
String to a char array???? outlet_anything(x->name_out, &s_symbol, name->Length , *namearray); //???Output the char array??? void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv);
outlet_anything() expects a list of "t_atom"s. a "t_atom" is *not* a character (or something you can arbitrarily choose) but a struct that is defined in m_pd.h and can hold a number OR a symbol OR a pointer.
to be precise, outlet_anything() is *very* similar to outlet_list(). the only difference is, that you can set the identifier (via the symbol "s") which is always "list" when using outlet_list().
so if you want to output several parameters at once (device-name, vendor-name, number of sensors), then use outlet_list() or outlet_anything().
if you just want to output the device-name as a symbol (the "normal" way, how pd handles "strings"), so you can use [select] or "$1"-substitution, use outlet_symbol(). the output will be "symbol foo".
if you want to output (only) the device-name as an "identifier" (the "other" way, how pd can handle "strings"), so you can use [route] but *not* "$1"-substitution, use outlet_anything(). the output will be "foo" (this is most likely *not* what you want)
mfg.a.sdr IOhannes
_______________________________________________ PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev