Re: mingw DLL problem

Holger Vogt <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
Al,

what I have just stated (see blelow) does not work for MINGW (but for MS 
http://msdn2.microsoft.com/en-us/library/z4zxe9k8(VS.80).aspx).
Module definition files in MINGW may be used for describing foreign dlls 
(http://www.mingw.org/MinGWiki/index.php/CreateImportLibraries)

Regards

Holger



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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.