[sword-devel] building libraries on Win32 (was: RE: e-Sword)

Troy A. Griffitts sword-devel@crosswire.org
Sun, 12 Nov 2000 16:05:43 -0700


Chris,
	I have no problem spitting out a DLL with C++Builder for you or anyone
else.  I think the issue comes to play in a few areas.

	Each C++ compiler mangles names differently.
	If VC++ doesn't support STL (which I'd be very suprised if they didn't
since it's officially in the spec). Then the .h files you use to compile
(even before trying to link to the DLL) will have compile errors.
	DLL stub libraries between VC++ and BC++ have different formats.
	A non C++/OO based language would virtually (no pun intended) have no
hope to try to link to a C++ DLL.


	Now, having said this.  I know there is support to link to a VC++ DLL
from within Borland, and I know I can run a utility called implib to
create a new stub library from a DLL.  So there may be support to go the
other way.  I'll post a DLL here shortly and let you try.

	-Troy.



Chris Little wrote:
> 
> I spent a while working with SWORD and VC++ to no avail.  On compile, VC++
> spits out a hundred or so STL-related errors, and since I know nothing about
> STL I can't fix them to make VC++ happy.  For all I know, it doesn't even
> support STL.
> 
> However... I tried using cygwin gcc on the SWORD sourcetree and it compiled
> flawlessly (as a static library, not a shared library/dll).  At the very
> least, this means console-based SWORD programs could be compiled.  I'm not
> yet sure if there is any difference between what gcc generates and what vc++
> would have generated, but it seems like it should be usable as a library in
> other compilers.  Unfortunately, when I tried writing a small test program
> in VC++ that uses the SWORD library compiled in gcc, it just spit out the
> same list of STL compile errors.
> 
> I'm about ready to pick up Borland C++ Builder to try to get a dll built.
> Their free tools would probably work, but I'd need the commercial one to
> know how to set up the project/makefile for it.
> 
> --Chris Little