From: Paul Garceau <pgarceau@te...> - 2001-01-22 23:47:47
On 23 Jan 2001, at 0:11, the Illustrious Chris Hansen wrote:
> How do I set up a .def file for C++ classes?
This sounds like more of a programming question than a mingw
question...at any rate, check out the mingwfaq under tutorials...there
are plenty of links there that talk about setting up .def files.
You might want to pay particular attention to the tutorial for win32
that Colin Peters put together some years ago...it talks about creating
.def files from existing .dlls (works for C and C++ generated .dlls).
You can also create .def files using a utilities such as "dlltool" and
"dllwrap" based on existing .a (static lib) files.
Nothing real can be threatened.
Nothing unreal exists.
--- Chris Hansen <popeofpop@...> wrote: > How do I set up a
.def file for C++ classes?
This is how I do it:
Get all the mangled names like so:
dlltool --dllname=$(LIBNAME).dll --export-all \
Then manually edit to get rid of the names you don't want to export.
If you don't want the demangled names as comments (ld -shared doesn't
like them either), do something like this:
cut -f1 -d; $(LIBNAME)-tmp.def > $(LIBNAME).def
Note that even if you don't use __declspec(dllexport) in code to mark
exports (using def file instead), you will still need to mark DATA
variables and objects as __declspec(dllimport) when importing from dll.
http://cars.yahoo.com.au/ - Yahoo! Cars
- Buy, sell or finance a car..