all groups > visual c libraries > september 2005 >
You're in the

visual c libraries

group:

.def for DLL



.def for DLL may
9/9/2005 2:38:16 PM
visual c libraries: I am trying to build a DLL. There are tons of new datatype and class are
defined in the code. I wonder if there is an easy way to setup the .def file
so that I can buid the dll and .lib? or is there a alternate way to avoid
manully defining all the exports?

Another questions is how can I export the template class? for example, if I
have some like, template <int W> class sc_int; , defined in the DLL, what is
the right way to put it in the .def file so that an application can use any
sc_int<x>?

Thanks a lot,
Re: .def for DLL David Lowndes
9/10/2005 10:03:54 AM
[quoted text, click to view]

Use __declspec(dllexport). For an overview, see the topic titled
"Exporting from a DLL" in MSDN.

[quoted text, click to view]

See if MSDN topic "How To Exporting STL Components Inside & Outside of
a Class" is any help.

Dave
--
AddThis Social Bookmark Button