Re: mingw DLL problem
Holger Vogt <[email protected]>
| Newsgroups | gmane.comp.gnu.gnucap.devel |
|---|---|
| Message-ID | <[email protected]> |
Al,
another option for creating the dll:
// test_dll.cpp
int bar()
{
return (2);
}
The file now has no #include of an export statement.
You need however, a module definition file TestDLL.def:
LIBRARY TestDLL
DESCRIPTION "Simple DLL"
EXPORTS
bar
This file is now linked in by the statement in the makefile:
## $(CC) -shared *.o $(CFLAGS) -o $(DLL) --driver-name=g++ $(LIBDIR)
-Wl,--out-implib,lib$(MODULE).a 2>&1 | c++filt
$(CC) -shared *.o --def $(MODULE).def $(CFLAGS) -o $(DLL)
--driver-name=g++ $(LIBDIR) -Wl,--out-implib,lib$(MODULE).a 2>&1 | c++filt
Regards
Holger