1

I downloaded the Xerces-c source from the xerces.appache mirror. I want to create a DLL I can use with C++Builder 10.0 Seattle, for both 32-bit and 64-bit.

The build instructions and download archive provide a Visual C++ Solution I can use with VS Studio Express 2015, OR instructions to build with make files designed for Borland C++. Borland gave up the C++ tools a decade ago, so without even trying the make files, I assumed they would not work with my Embarcadero 10.0 Seattle compiler. Thus, I built xerces-all with VS Studio Express 2015, and it all appears to work. (The DLL built without error, and the samples built and seem to run.)

I have been trying to make changes to the VS Studio solution (changing calling convention from __cdecl to __stdcall), but that just makes the samples fail to build.

Following advice from Remy Lebeau and this article I found (Using Visual C++ DLLs with C++Builder), I have attempted to use Embarcadero utilities TDUMP, IMPDEF and IMPLIB to extract the export names from the built DLL. These yield output that looks like this:

EXPORT ord:1763='?Initialize@XMLPlatformUtils@xercesc_3_1@@SAXKKKQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z'

I posted the application code I'm trying to build as a simple test in this thread:

unresolved external 'xercesc_3_1::XMLPlatformUtils::Initialize' in C++ Builder test app

I am confused beyond belief. How can I get either a DLL or a LIB I can use with my tools?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Kathleen
  • 108
  • 7
  • C++Builder still includes the old Borland compiler, so you should be able to use makefiles. And you don't need to change calling conventions in the code, `__cdecl` and `__stdcall` are standard conventions that C++Builder and VS support equally, the only difference is in the name mangling, and a DEF file can handle that. If you are having problems using TDUMP, IMPDEF, and IMPLIB, you should post a separate question about that issue. – Remy Lebeau Aug 16 '16 at 17:33
  • I know for a fact that Xerces works with older versions of C++Builder, so it should be possible to make it work in 10.0 Seattle as well. Or, you could consider switching to a different XML library. I personally use [libxml2](http://xmlsoft.org) in C++Builder and it works fine for me. – Remy Lebeau Aug 16 '16 at 17:39
  • I will post separate questions about my problems with TDUMP, IMPDEF and IMPLIB. I will also see if switching to libxml2 will make this all less painful. Thanks, Remy. You're always the one with the answers that help me. – Kathleen Aug 16 '16 at 19:11
  • I have now used the Xerces-provided MAKE files to create Xerces-bor_3_1_4.dll (for Win32) which works with my CX10 GUI. Sorry for assuming otherwise and starting this misleading thread. – Kathleen Aug 17 '16 at 16:01

0 Answers0