[ODE] ODE as DLL

Nate W coding at natew.com
Thu Jan 3 10:23:02 2002


On Thu, 3 Jan 2002 nlin@nlin.net wrote:

> Basically the main thing which needed to be done was to add
> __declspec(dllimport) and __declspec(dllexport) before all global variables
> which were used [....]
> 
> One issue is that the exports list in config/msvcdefs.def needs to be
> updated when new functions are exported.

I'm glad to see I'm not alone in wanting a DLL!  I've been toying with
this idea for a while, thanks for getting the ball rolling.  Here's an
idea, though:

If you add the __declspec() in front of the function declarations as well
as global variables, you won't need the .def file.  This means more work
up front, as you have to add __declspec() in dozens of places, there
should be less work and less headaches later on, because there's no need
to continually synch the .def file with the API.  

That's the approach I used for the DLLs in my application, and it's really
nice not to have to synchronize .def files and exported APIs.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com