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 "Steven T. Hatton" <ha...@globalsymmetry.com> on 2003/07/06 01:25:26 UTC
undefined reference to `xercesc_2_3::...
I've seen where some others on the list are having similar problems as I am
having, but I didn't see a solution that addressed my situation.
I'm 98% sure this is some kind of configuration issue. I have been able to
build and install xercesc_2_3 on my SuSE 8.2 box. The sample code builds
when I use the runConfigure script from the default location. For some
reason, very similar code gives me problems when I try to build from another
directory, and without the Makefiles, etc. IOW, I create a simple main.cpp:
/* main.cpp */
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/dom/DOM.hpp>
#include <iostream>
using namespace xercesc;
main(int argC, char* argV[]){
XMLPlatformUtils::Initialize();
}
/* EOF */
g++ main.cpp
/tmp/ccJftyNg.o(.text+0x17): In function `main':
: undefined reference to `xercesc_2_3::XMLUni::fgXercescDefaultLocale'
/tmp/ccJftyNg.o(.text+0x1c): In function `main':
: undefined reference to `xercesc_2_3::XMLPlatformUtils::Initialize(char
const*, char const*, xercesc_2_3::PanicHandler*,
xercesc_2_3::MemoryManager*)'
collect2: ld returned 1 exit status
What's up with that?
I've attempted various things such as of -I $XERCESCROOT/include -L
$XERCESCROOT/lib to no avail. My guess it's some kind of linker flag, or
similar. I'm no C++ expert, so I may be missing something fairly basic.
STH
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Solved: undefined reference to `xercesc_2_3::...
Posted by "Steven T. Hatton" <ha...@globalsymmetry.com>.
On Saturday 05 July 2003 04:25 pm, Steven T. Hatton wrote:
[snip]
> /* main.cpp */
> #include <xercesc/util/PlatformUtils.hpp>
> #include <xercesc/util/XMLString.hpp>
> #include <xercesc/dom/DOM.hpp>
> #include <iostream>
>
> using namespace xercesc;
>
> main(int argC, char* argV[]){
> XMLPlatformUtils::Initialize();
> }
>
> /* EOF */
>
> g++ main.cpp
>
> /tmp/ccJftyNg.o(.text+0x17): In function `main':
> : undefined reference to `xercesc_2_3::XMLUni::fgXercescDefaultLocale'
>
> /tmp/ccJftyNg.o(.text+0x1c): In function `main':
> : undefined reference to `xercesc_2_3::XMLPlatformUtils::Initialize(char
>
> const*, char const*, xercesc_2_3::PanicHandler*,
> xercesc_2_3::MemoryManager*)'
> collect2: ld returned 1 exit status
[snip]
I found this:
http://marc.theaimsgroup.com/?l=xerces-c-dev&m=103910442924621&w=2
I'm not sure If I needed to do the ldconfig -v, but I did that, then g++
main.cpp -lxerces-c, and It seems to compile. What is the significance of
the switch?
STH
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org