[CMake] problem with Xerces-C++ 2.7

Pierre Malarme pmalarme at ulb.ac.be
Thu Mar 8 13:51:56 EST 2007


I have a problem using Xerces-C++ with cmake. I'm on Mac OS X 10.4.8  
with an Intel Core 2 Duo. I try to compile a parser.cpp file with  
nothing more that includes that i need. When i do so, i have this  
error message in return :

[100%] Building CXX object CMakeFiles/Dom.dir/parser.o
Linking CXX executable Dom
/usr/bin/ld: Undefined symbols:
xercesc_2_7::DTDEntityDecl::serialize(xercesc_2_7::XSerializeEngine&)
xercesc_2_7::XMLAttDefList::serialize(xercesc_2_7::XSerializeEngine&)
xercesc_2_7::XMLEntityDecl::~XMLEntityDecl()
xercesc_2_7::SAXParseException::SAXParseException 
(xercesc_2_7::SAXParseException const&)
xercesc_2_7::SAXParseException::~SAXParseException()
xercesc_2_7::XMemory::operator delete(void*)
xercesc_2_7::DTDEntityDecl::getProtoType() const
xercesc_2_7::DTDEntityDecl::isSerializable() const
xercesc_2_7::XMLAttDefList::getProtoType() const
xercesc_2_7::XMLAttDefList::isSerializable() const
xercesc_2_7::PSVIItem::getActualValue() const
typeinfo for xercesc_2_7::XMLEntityDecl
typeinfo for xercesc_2_7::SAXParseException
collect2: ld returned 1 exit status
make[2]: *** [Dom] Error 1
make[1]: *** [CMakeFiles/Dom.dir/all] Error 2
make: *** [all] Error 2

My FindXerces.cmake file is :

#SET THE ROOT DIRECTORY WHERE XERCES-C++ IS INSTALLED
SET(XERCES_ROOT_DIR /Developer/CPP/xerces-c-src_2_7_0)

#DO NOT CHANGE
SET(XERCES_LIBRARY_DIR ${XERCES_ROOT_DIR}/lib)
SET(XERCES_INCLUDE_DIR ${XERCES_ROOT_DIR}/include)
SET(XERCES_LINK_FLAGS -L${XERCES_LIBRARY_DIR})
SET(XERCES_INC_FLAGS -I${XERCES_INCLUDE_DIR})

INCLUDE_DIRECTORIES(${XERCES_INCLUDE_DIR})
LINK_DIRECTORIES(${XERCES_LIBRARY_DIR})
LINK_LIBRARIES(${XERCES_LINK_FLAGS})
ADD_DEFINITIONS(${XERCES_INC_FLAGS})

and my CMakeLists.txt file is :

PROJECT(Dom)
INCLUDE (FindXerces.cmake)
SET(SRCS parser.cpp)
ADD_Executable(Dom ${SRCS})


Thanks to respond

Pierre/




-------------------------------------------------------------------
Pierre Malarme
Etudiant - 2 Master en ingénierie biomédicale
- Informatique et imagerie médicale
Faculté des Sciences Appliquées
- Ecole Polytechnique
Université Libre de Bruxelles
pmalarme at ulb.ac.be




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070308/7eaabb3e/attachment.html


More information about the CMake mailing list