G Quested wrote:
On Wed, 25 Jan 2006, IOhannes m zmoelnig wrote:
G Quested wrote:
Hi, I am trying to compile and run the example externals bundled with Pd 39.1 (the pre-compiled for windows version).
I can compile the obj1.c file and create a dll which i place in the extras directory but Pd doesn't like it:
load_object: Symbol "obj1_setup" not found obj1 ... could not create
I exported obj1_setup using __declspec(dllexport)
all my knowledge is vc6-based, so i might talk nonsense. however, i think you also have to tell the linker that you want to export the setup-function via the "/export:obj1_setup" flag. (i think that "__declspec(dllexport)" is just for the compiler)
Thanks for the replies. I tried adding /export:obj1_setup to the command line section of the project->properties->linker but has made no difference. I also tried using a .def file but this hasn't helped.
I'm not too familiar with Visual Studio. Is their a tool to inspect the dll's symbol table. At least then i will know the dll is ok. I will try to find a machine with VS6 and compile the code there to see if that sorts it out.
That wont solve my problem as i need to be able to compile on VS.net for the thing I'm working on :-(
I've never needed to use any /export flag. I'm using Visual C++ 2005 Express Edition Beta (because it was free as in beer), which looks like a limited version of VS8. If the project is set up to make a dll, I think the only other thing to check is that you have MSW defined somewhere before you include m_pd.h, because VS defines _MSC_VER_ and _WIN32, but not MSW or NT.
Martin