OK, so you werent so excited about my last email. Thats cool. Ive decided to write my own external to solve the problem, but Im getting problems. Ive never compiled a dll in microsquish visual c++ 6.0 before.
Im trying to get the helloworld.c demo from the iem site to compile but I get unresolved linker errors. Can anyone make a workspace that has all the project settings correct or perhaps direct me towards my goal?
Thank you for your time and patience. -wade
Yo Wade,
I've just recently gotten my first external to compile successfully in VC++6. I can tell you things that tripped me up:
category and under additional include directories, put the path to your pd source directory, so that you can link to the m_pd.h file. 3) Under The link tab in the project settings, add pd.lib to the list of library modules to link to. And, pick the "Input" category and put the path to your pd bin directory (where pd.lib is) under additional library path 4) Make a file that is called <external name>.def, for instance i just made a square wave generator and my def file is square~.def. You might know about this, but I didn't and no one ever mentioned it to me. The def file defines the functions that you are exporting so that pd can call them. You need to export your setup function. E.g., for mine it was called square_tilde_setup. The format of the def file is this:
LIBRARY <external name> DESCRIPTION <a comment for describing your external if you want>
EXPORTS <setup function name> @1
so mine was:
LIBRARY square~ DESCRIPTION module for making a square wave
EXPORTS square_tilde_setup @1
If you need to export more functions, just put them in a list under exports, one line at a time, with @2, @3, etc next to them. Oh, and the function name should be just the name, no argument list, no parentheses. I learned all of this from some random dll tutorial I found online for writing device drivers. (Lost the URL).
Make sure you add this file to your project so that it will be used when the dll is compiled. Otherwise, you'll get a compiled dll but when you try to load it, pd will complain that it can't find your setup function.
I hope this makes sense. I was really frustrated when I first tried to make externals on windows because I found very little help!
Good luck, Chadwick
p.s. I'll try to come up with an empty project and workspace for making externals in a day or two and post it online, now that I know how. Why doesn't this exist already?!?!?!
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]On Behalf Of pdman Sent: Thursday, August 14, 2003 12:47 PM To: the PD list Subject: [PD] More help for a newbie?
OK, so you werent so excited about my last email. Thats cool. Ive decided to write my own external to solve the problem, but Im getting problems. Ive never compiled a dll in microsquish visual c++ 6.0 before.
Im trying to get the helloworld.c demo from the iem site to compile but I get unresolved linker errors. Can anyone make a workspace that has all the project settings correct or perhaps direct me towards my goal?
Thank you for your time and patience. -wade
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
"Chad A. Wood" schrieb:
p.s. I'll try to come up with an empty project and workspace for making externals in a day or two and post it online, now that I know how. Why doesn't this exist
Well, you could copy VC++ 6.0 projects from other externals / libraries (maxlib has one, for example). Most people seem to use the makefile directly, probably because you just need one makefile that contains all the information for all platforms. Instead of building a VC++ project / workspace from scratch it's also possible to 'import' existing makefiles. All changes still have to be made to the makefile directly (text editor), but it's possible to press F7 in VC++ to get everything compiled without having to type "nmake pd_nt" or whatever.
Olaf
Well, I don't claim to be very good at understanding the compilation environment on windows, but I could never get those makefiles to work, because I could never get my path right to link to m_pd.h. And in fact I emailed about this on pd-dev a couple times, but no one could ever seem to help me out.
Chad
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]On Behalf Of Olaf Matthes Sent: Thursday, August 14, 2003 2:48 PM To: pd-list Subject: Re: [PD] More help for a newbie?
"Chad A. Wood" schrieb:
p.s. I'll try to come up with an empty project and workspace for making externals in a day or two and post it online, now that I know how. Why doesn't this exist
Well, you could copy VC++ 6.0 projects from other externals / libraries (maxlib has one, for example). Most people seem to use the makefile directly, probably because you just need one makefile that contains all the information for all platforms. Instead of building a VC++ project / workspace from scratch it's also possible to 'import' existing makefiles. All changes still have to be made to the makefile directly (text editor), but it's possible to press F7 in VC++ to get everything compiled without having to type "nmake pd_nt" or whatever.
Olaf
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
I know zero about pd. Which is more than I know about a lot of things.
But. Do you all have to use VC++? I needed to recompile some 19 yr old, no gui, c code about six months ago to run on a new Win2k box. I went to Borland, downloaded a nice and simple compiler (the command-line only portion Borland C++ Builder 5), a really useful help file, and had my old code nicely rebuilt in about an hour. Didn't even bother with a make file, just a few command line flags. It was all in the help file. And free too.
Good luck to all -- Andrew Culver
At 03:10 PM 8/14/2003 -0500, Chad A. Wood wrote:
Well, I don't claim to be very good at understanding the compilation environment on windows, but I could never get those makefiles to work, because I could never get my path right to link to m_pd.h. And in fact I emailed about this on pd-dev a couple times, but no one could ever seem to help me out.
Chad
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]On Behalf Of Olaf Matthes Sent: Thursday, August 14, 2003 2:48 PM To: pd-list Subject: Re: [PD] More help for a newbie?
"Chad A. Wood" schrieb:
p.s. I'll try to come up with an empty project and workspace for making externals in a day or two and post it online, now that I know how. Why doesn't this exist
Well, you could copy VC++ 6.0 projects from other externals / libraries (maxlib has one, for example). Most people seem to use the makefile directly, probably because you just need one makefile that contains all the information for all platforms. Instead of building a VC++ project / workspace from scratch it's also possible to 'import' existing makefiles. All changes still have to be made to the makefile directly (text editor), but it's possible to press F7 in VC++ to get everything compiled without having to type "nmake pd_nt" or whatever.
Olaf
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Andrew Culver culver@anarchicharmony.org www.anarchicharmony.org