Hi everyone,
Making progress on this. . . I see in the m_pd.h file how the #ifdef looks to see if it's being compiled in C++, and if so wraps it in "extern C{}". I'm still having linking errors, trying to build the "foo1" example (a bunch of unresolved external symbols, all of which are defined in m_pd.h. This occurs even if I wrap the foo1.c code. My attention is drawn to a later #ifdef, which conditionally redefines the external storage class "extern" if you are using NT; would the fact that I am using Win98 and not NT keep this #ifdef from being executed properly?
One last thing. . . In the pd documentation on externs, it says "To compile, type "make pd_linux", "nmake pd_nt", "make pd_irix5" or "make pd_irix6"." What is this referring to (in other words, where do I type "make pd_nt")?
Thanks again for all the help.
Greg
Karl MacMillan wrote:
On Saturday 03 November 2001 01:09 pm, Greg Rippin wrote:
Hello everyone,
I'm getting into creating pd externals on Win98 using visual C++ 6.0. I've started with the howto paper on the IEM site, and I'm having trouble building the first "hello world" example. I receive terror C2664: 'class_new' : cannot convert parameter 6 from 'const int' to 't_atomtype'. I believe this is referring to the "0" that terminates the list of object arguments.
I suspect that I may have to change the code (originally for Linux, I think) a bit to compile correctly on windows. .. Can anyone suggest anywhere to start?
I think this is a C++ issue, not a windows issue. If you can make VC++ compile this as plain C your problems should go away. Otherwise you are going to have to place some explicit casts in the code and wrap your function prototypes in "extern C { }" to make them use C linkage. For more information about the latter you can look at the Gem externals or ask on the list. Unless you are going to use C++ features, it is probably not worth the trouble, though.
Karl
Thanks, Greg
-- Greg Rippin, Graduate Assistant Music Technology Program New York University 35 West 4th Street, Suite 777 New York, NY 10012
phone 212-998-5422 fax 212-995-4043 musictechgrad.info@nyu.edu www.nyu.edu