You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by sudipta sinha <ra...@lycos.com> on 2000/12/11 15:58:36 UTC

XERCES C++ on Solaris 2.8

Hello,

I am having a problem using the Xerces1.3.0 library on Solaris 2.8.

The problem basically is coming from a mixing of C and C++ code.

I am trying to do XML validation in a shared library, which has to be compiled by a C compiler ( to be used with another program!! )
The file cannot be named as .cpp and compiled by a C++ compiler.
There is a linking problem, when I try to use it after naming it to a .cpp, although compilation is fine.

basically gcc -c file.c   works

but gcc -c file.cpp does not work because, it now invokes the C++ compiler, 

Now, to use Xerces C++ I have to put that those functions in a .cpp file. Which I cannot ... 

I am using gcc as my C compiler, and g++ as C++ compiler, but the same thing happens when I use cc and CC on Solaris.

However on Windows it works fine, since Windows has the same compiler for C and C++.

My basic question is that -

Can we use Xerces exclusively from a C source file, named filename.c
if so, how can we do it?

Some help in this regard would be very useful,

Thanks in advance,

Sudipta Sinha


Get FREE Email/Voicemail with 15MB at Lycos Communications at http://comm.lycos.com