You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Nicholas G. Lesniewski-Laas" <Ra...@animewired.net> on 2001/10/25 21:44:51 UTC

Xerces with BCC 5.5

Hi, I hope I don't come off as sounding stupid or ridiculously ignorant, 
but I can't for the life of me figure out why I can not compile Xerces 
client programs, or even Xerces itself, with the free Borland C++ 5.5 compiler.


Compiling the Examples:

When attempting to compile client programs, I'm scolded with the infamous 
"Unresolved External" errors.  I understand this means that there is an 
error in the OMF import library I'm trying to use.  I've tried "implib"ing 
the Xerces DLLs.  This proved ineffective in fending off those "unresolved 
externals".  Next I tried using Borland's "COFF2OMF" program to convert the 
import libraries supplied with the Xerces package into usable OMF import 
libraries.  Again, failure.  I decided that the only way I could think of 
to get rid of these blasted errors was to compile the Xerces library source 
with BCC, because I figured there may have been a Visual C++ induced 
annoyance in the DLL supplied with the package.


Compiling the Xerces Source:

Frustrated over my inability to compile the sample programs that came in 
the Xerces package, I attempted to compile the Xerces source.  And what did 
I find when I unzipped the Xerces-src package?  I found nice little project 
files supporting various C++ compilers, but not the one I was trying to 
use.  True, there is the BCB4 project, which almost worked except for the 
fact that the free Borland compiler does not come with the VCL library, 
which is necessary to compile the Xerces BCB project.  I had not lost hope 
just yet, as I could think of a few different ways in which I could perhaps 
avoid the VCL libraries, or perhaps even download them.  Alas, all my 
efforts were for not, and I finally accepted defeat.


Now I plead with thee, if you good people could help me resolve my problem, 
I would be in your debt.

Thank You.


--Nick


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Xerces with BCC 5.5

Posted by "Nicholas G. Lesniewski-Laas" <Ra...@animewired.net>.
Don-

Yeah, I'd really appreciate you sending me the BCB5 compiled library, that 
would make my life considerably easier, thank you!

--Nick


At 06:31 AM 10/26/01 -0400, you wrote:
>Nick,
>
>Your comments aren't stupid or ignorant.  Transforming a BCB project into 
>a usable make file is a function better left for the IDE to 
>perform.  Rather than working off the BCB4 project (which is badly out of 
>date), you might want to pull the BCB5 make file (not the project file) 
>from the CVS source tree and modify it to remove the VCL dependencies.
>
>I am aware of the inability to build Xerces with BCC.  When I upgraded the 
>Xerces build environment to build with BCB5, I didn't do the final step to 
>remove the dependency on the VCL.  It's on my todo list.  I hope to 
>attempt this in the near future if time permits, but it won't make it into 
>version 1.5.2 that should occur in the very near future.
>
>Converting COFF to OMF formats is at best, an occasionally reliable 
>process as you are probably aware.  It is understandable that it only 
>seems to work for the simplest of object files.  COFF is a moving 
>target.  Basically you asking for the conversion program to implement 
>every VC++ object file record format and transform it into an OMF 
>equivalent, if one exists.
>
>In the mean time, if you want a copy of the compiled library, please send 
>me email.  Zipped up, its 527Kb and was built this morning from the latest 
>CVS source tree.
>
>Hope this helps,
>Don
>
>At 03:44 PM 10/25/2001 -0400, you wrote:
>>Hi, I hope I don't come off as sounding stupid or ridiculously ignorant, 
>>but I can't for the life of me figure out why I can not compile Xerces 
>>client programs, or even Xerces itself, with the free Borland C++ 5.5 compiler.
>>
>>
>>Compiling the Examples:
>>
>>When attempting to compile client programs, I'm scolded with the infamous 
>>"Unresolved External" errors.  I understand this means that there is an 
>>error in the OMF import library I'm trying to use.  I've tried 
>>"implib"ing the Xerces DLLs.  This proved ineffective in fending off 
>>those "unresolved externals".  Next I tried using Borland's "COFF2OMF" 
>>program to convert the import libraries supplied with the Xerces package 
>>into usable OMF import libraries.  Again, failure.  I decided that the 
>>only way I could think of to get rid of these blasted errors was to 
>>compile the Xerces library source with BCC, because I figured there may 
>>have been a Visual C++ induced annoyance in the DLL supplied with the package.
>>
>>
>>Compiling the Xerces Source:
>>
>>Frustrated over my inability to compile the sample programs that came in 
>>the Xerces package, I attempted to compile the Xerces source.  And what 
>>did I find when I unzipped the Xerces-src package?  I found nice little 
>>project files supporting various C++ compilers, but not the one I was 
>>trying to use.  True, there is the BCB4 project, which almost worked 
>>except for the fact that the free Borland compiler does not come with the 
>>VCL library, which is necessary to compile the Xerces BCB project.  I had 
>>not lost hope just yet, as I could think of a few different ways in which 
>>I could perhaps avoid the VCL libraries, or perhaps even download 
>>them.  Alas, all my efforts were for not, and I finally accepted defeat.
>>
>>
>>Now I plead with thee, if you good people could help me resolve my 
>>problem, I would be in your debt.
>>
>>Thank You.
>>
>>
>>--Nick
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Xerces with BCC 5.5

Posted by Don Mastrovito <dm...@marathontechnologies.com>.
Nick,

Your comments aren't stupid or ignorant.  Transforming a BCB project into a 
usable make file is a function better left for the IDE to perform.  Rather 
than working off the BCB4 project (which is badly out of date), you might 
want to pull the BCB5 make file (not the project file) from the CVS source 
tree and modify it to remove the VCL dependencies.

I am aware of the inability to build Xerces with BCC.  When I upgraded the 
Xerces build environment to build with BCB5, I didn't do the final step to 
remove the dependency on the VCL.  It's on my todo list.  I hope to attempt 
this in the near future if time permits, but it won't make it into version 
1.5.2 that should occur in the very near future.

Converting COFF to OMF formats is at best, an occasionally reliable process 
as you are probably aware.  It is understandable that it only seems to work 
for the simplest of object files.  COFF is a moving target.  Basically you 
asking for the conversion program to implement every VC++ object file 
record format and transform it into an OMF equivalent, if one exists.

In the mean time, if you want a copy of the compiled library, please send 
me email.  Zipped up, its 527Kb and was built this morning from the latest 
CVS source tree.

Hope this helps,
Don

At 03:44 PM 10/25/2001 -0400, you wrote:
>Hi, I hope I don't come off as sounding stupid or ridiculously ignorant, 
>but I can't for the life of me figure out why I can not compile Xerces 
>client programs, or even Xerces itself, with the free Borland C++ 5.5 compiler.
>
>
>Compiling the Examples:
>
>When attempting to compile client programs, I'm scolded with the infamous 
>"Unresolved External" errors.  I understand this means that there is an 
>error in the OMF import library I'm trying to use.  I've tried "implib"ing 
>the Xerces DLLs.  This proved ineffective in fending off those "unresolved 
>externals".  Next I tried using Borland's "COFF2OMF" program to convert 
>the import libraries supplied with the Xerces package into usable OMF 
>import libraries.  Again, failure.  I decided that the only way I could 
>think of to get rid of these blasted errors was to compile the Xerces 
>library source with BCC, because I figured there may have been a Visual 
>C++ induced annoyance in the DLL supplied with the package.
>
>
>Compiling the Xerces Source:
>
>Frustrated over my inability to compile the sample programs that came in 
>the Xerces package, I attempted to compile the Xerces source.  And what 
>did I find when I unzipped the Xerces-src package?  I found nice little 
>project files supporting various C++ compilers, but not the one I was 
>trying to use.  True, there is the BCB4 project, which almost worked 
>except for the fact that the free Borland compiler does not come with the 
>VCL library, which is necessary to compile the Xerces BCB project.  I had 
>not lost hope just yet, as I could think of a few different ways in which 
>I could perhaps avoid the VCL libraries, or perhaps even download 
>them.  Alas, all my efforts were for not, and I finally accepted defeat.
>
>
>Now I plead with thee, if you good people could help me resolve my 
>problem, I would be in your debt.
>
>Thank You.
>
>
>--Nick
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Xerces with BCC 5.5

Posted by Andrew Snare <AS...@allshare.nl>.
At 03:44 PM 25/10/2001 -0400, Nicholas G. Lesniewski-Laas wrote:
>Hi, I hope I don't come off as sounding stupid or ridiculously ignorant, 
>but I can't for the life of me figure out why I can not compile Xerces 
>client programs, or even Xerces itself, with the free Borland C++ 5.5 compiler.
>
>Compiling the Examples:
>
>When attempting to compile client programs, I'm scolded with the infamous 
>"Unresolved External" errors.  I understand this means that there is an 
>error in the OMF import library I'm trying to use.  I've tried "implib"ing 
>the Xerces DLLs.  This proved ineffective in fending off those "unresolved 
>externals".  Next I tried using Borland's "COFF2OMF" program to convert 
>the import libraries supplied with the Xerces package into usable OMF 
>import libraries.  Again, failure.  I decided that the only way I could 
>think of to get rid of these blasted errors was to compile the Xerces 
>library source with BCC, because I figured there may have been a Visual 
>C++ induced annoyance in the DLL supplied with the package.

The OMF issue is a red-herring here. The Win32 DLL that is released is 
compiled with MSVC, who use a different mangling scheme for C++ to Borland. 
One of the annoying things about C++ is that in practice any C++ libraries 
you use must be compiled with the same compiler.

This means the only way to use Xerces with Borland C/C++ 5.5 is the second 
option you tried...

>Compiling the Xerces Source:
>
>Frustrated over my inability to compile the sample programs that came in 
>the Xerces package, I attempted to compile the Xerces source.  And what 
>did I find when I unzipped the Xerces-src package?  I found nice little 
>project files supporting various C++ compilers, but not the one I was 
>trying to use.  True, there is the BCB4 project, which almost worked 
>except for the fact that the free Borland compiler does not come with the 
>VCL library, which is necessary to compile the Xerces BCB project.  I had 
>not lost hope just yet, as I could think of a few different ways in which 
>I could perhaps avoid the VCL libraries, or perhaps even download 
>them.  Alas, all my efforts were for not, and I finally accepted defeat.

The next version of Xerces-C will come with a build project for BCB5, I 
believe. This isn't as good as makefiles for using the free BCPP5.5 
command-line tools, but it might be better.

In the meantime, it _is_ possible to build the Xerces-C library manually. I 
found the best way to do this is to start with the MSVC makefiles, and use 
them to hand-create makefiles for use with Borland. With this method, I ran 
into a few problems:

1) Building a DLL was unreliable. I can't remember the exact problems now, 
but it was error-prone. This was probably my fault, and related to the 
issue of passing dynamically-allocated memory across DLL boundaries (which 
happens with every transcode() call. Bad design here, on the part of 
Xerces, but we should bitch about that somewhere else).

2) Building Xerces as a static library works, but can leak incredible 
amounts of memory. Specifically, every parse of a file with external entity 
references (eg, an external DTD) leaks about 128KB of memory. This proved 
very difficult to track down.

I thought about submitting my build process, but to be honest it's a bit 
messy and probably doesn't do things correctly. If anyone is interested, I 
don't mind sending them what I've done but I won't have much time to help 
with fixing the problems.

Hopefully the BCB5 project in the next release will make things a lot 
easier for all of us, as well as increase the userbase interested in 
tracking down the memory leak.

Cheers,

  - Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org