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)
Do i need to recompile pd for .net? I found articles in the archive where making your dll's with VS5 when Pd was compiled with VS6 was a problem. Any help will be appreciated
Thanks
On 1/25/06, G Quested garryq@comp.leeds.ac.uk wrote:
Do i need to recompile pd for .net? I found articles in the archive where making your dll's with VS5 when Pd was compiled with VS6 was a problem.
I tried once to build Pd using VS 2003 and all of the makefiles looked hardcoded to VS98, which made it more trouble than I was wanting at the time. I seem to recall people putting effort into using minGW to build Pd and externals, so maybe that is an option?
cgc
On Jan 25, 2006, at 10:46 AM, chris clepper wrote:
On 1/25/06, G Quested garryq@comp.leeds.ac.uk wrote:
Do i need to recompile pd for .net? I found articles in the archive where making your dll's with VS5 when Pd was compiled with VS6 was a problem.
I tried once to build Pd using VS 2003 and all of the makefiles looked hardcoded to VS98, which made it more trouble than I was wanting at the time. I seem to recall people putting effort into using minGW to build Pd and externals, so maybe that is an option?
Basically everything compiles with MinGW (PDP and PiDiP should be
possible too without a ton of work). To get everything compiling with
MSVC it will take a lot of work because the compiler works differently
that gcc, which is used on GNU/Linux, Mac OS X, and MinGW. From my
experience with MSVC 6, you can get about half of the externals to
compile.
The MinGW setup is relatively easy to do:
http://puredata.org/docs/developer/mingw
It would be quite interesting to see a speed comparison from Pd
compiled with MinGW/gcc and MSVC. I wonder what the different is...
.hc
"Computer science is no more related to the computer than astronomy is
related to the telescope."
-Edsger
Dykstra
Zitiere Hans-Christoph Steiner hans@eds.org:
It would be quite interesting to see a speed comparison from Pd
compiled with MinGW/gcc and MSVC. I wonder what the different is...
we once did a speed comparision between [mtx_*~] compiled with msvc vs the MinGW/gcc cross-compiler (here it is again!), mainly to test whether the cross-compiled externals are any good on w32.
the good thing is, that the free solution turned out to be slightly faster!
mfg.asrd IOhannes
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)
mfg.asd.r IOhannes
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 :-(
Thanks again, Garry.
mfg.asd.r IOhannes
Hi Garry, i have no problems using VS.NET in any version... i find them to behave very similar.
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)
that should not be necessary. Would you mind posting your obj1 file?
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.
try "dumpbin /exports my.dll"
best, Thomas
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
On Jan 25, 2006, at 1:37 PM, Martin Peach wrote:
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.
I think its _MSC_VER instead of _MSC_VER_ actually. I've started to
chip away at MSW and NT, many externals and some parts of Pd are
already using _MSC_VER and _WIN32 since I was porting things to MinGW.
To anyone who is listening! ;) Don't use NT, MSW, MACOSX, UNIX! There
are automatic versions of these:
NT == _WIN32 MSW == _WIN32 MSVC-specific things = _MSC_VER MACOSX == __APPLE__
and __linux__ or __gnu_linux__ are also good.
.hc
http://at.or.at/hans/
On Wed, 25 Jan 2006, Martin Peach wrote:
<snip>
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
Sorted it now. Thanks everyone! dumpbin.exe told me obj1_setup wasn't being exported I added MSW to the preprocessor definitions and bob's yer uncle. no /export, .def files or __declspec needed so the obj1.c example file didn't need any modifications.
BTW It worked out of the box with gcc but i needed to get it working with VS.net so I can get our students using it (they only have access to VS.net).
Cheers, Garry.