Page 3 of 3

Re: XERCES not found

Posted: Fri Jul 17, 2015 7:43 pm
by daniel
Regarding the '.lib' problem, I guess the script is for Windows only...

Then if you use 'libxerces' from the Debian repo, shouldn't you also recompile libE57 with the same version of Xerces?

And last but not least, only CC_CORE_LIB can be compiled as a static library (uncheck the 'COMPILE_CC_CORE_LIB_SHARED' variable).

Re: XERCES not found

Posted: Sat Jul 18, 2015 10:52 am
by jgpallero
daniel wrote:Regarding the '.lib' problem, I guess the script is for Windows only...

Then if you use 'libxerces' from the Debian repo, shouldn't you also recompile libE57 with the same version of Xerces?

And last but not least, only CC_CORE_LIB can be compiled as a static library (uncheck the 'COMPILE_CC_CORE_LIB_SHARED' variable).
I've compiled E57 with the xerces from Debian and was successful

Where is the option 'COMPILE_CC_CORE_LIB_SHARED'? I can't find it (I've checked the Advanced box in cmake-gui)

Re: XERCES not found

Posted: Sat Jul 18, 2015 6:41 pm
by jgpallero
Well, I've seen the COMPILE_CC_CORE_LIB_SHARED is only available in the git repository. I've tried to compile CC disabling the option, but I obtain this error at compile time:

Code: Select all

[ 95%] Building CXX object qCC/CMakeFiles/CloudCompare.dir/qrc_icones.cxx.o
Linking CXX executable CloudCompare
../CC/libCC_CORE_LIB.a(PointProjectionTools.cpp.o): En la función `FindNearestCandidate(unsigned int&, std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*> const&, std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*> const&, std::vector<CCLib::PointProjectionTools::IndexedCCVector2, std::allocator<CCLib::PointProjectionTools::IndexedCCVector2> > const&, std::vector<HullPointFlags, std::allocator<HullPointFlags> > const&, float, float, bool)':
PointProjectionTools.cpp:(.text+0x19ca): definiciones múltiples de `FindNearestCandidate(unsigned int&, std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*> const&, std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*> const&, std::vector<CCLib::PointProjectionTools::IndexedCCVector2, std::allocator<CCLib::PointProjectionTools::IndexedCCVector2> > const&, std::vector<HullPointFlags, std::allocator<HullPointFlags> > const&, float, float, bool)'
CMakeFiles/CloudCompare.dir/ccContourExtractor.cpp.o:ccContourExtractor.cpp:(.text+0x0): primero se definió aquí
collect2: error: ld returned 1 exit status
qCC/CMakeFiles/CloudCompare.dir/build.make:3680: recipe for target 'qCC/CloudCompare' failed
make[2]: *** [qCC/CloudCompare] Error 1
CMakeFiles/Makefile2:690: recipe for target 'qCC/CMakeFiles/CloudCompare.dir/all' failed
make[1]: *** [qCC/CMakeFiles/CloudCompare.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Re: XERCES not found

Posted: Sat Jul 18, 2015 7:26 pm
by daniel
Oh, this option was meant to be used when compiling CC_CORE_LIB alone (as this is a LGPL library, it can be used by other projects as a standalone component).

I never tried to use this option when compiling CC.

Re: XERCES not found

Posted: Sat Jul 18, 2015 7:55 pm
by jgpallero
Mmm, so the support dor E57 in linux it is impossible at tis point. Apparently, compilation of E57 in linux only is possible as static library, but I don't know if CC could be fixed for using it

Re: XERCES not found

Posted: Sun Jul 19, 2015 11:02 am
by daniel
I'm not sure to see the link between libE57 being static and CC_CORE_LIB being static. You can use static lib next to dynamic ones without any problem.

You may have to fix the CMake scripts though.

Re: XERCES not found

Posted: Sun Jul 19, 2015 11:31 am
by jgpallero
daniel wrote:I'm not sure to see the link between libE57 being static and CC_CORE_LIB being static. You can use static lib next to dynamic ones without any problem.

You may have to fix the CMake scripts though.
Yes, I think also there is no problem about linking static with shared libraries, but the errors in my compilation were due to the static libE57 as it can be seen in one of my previous comment: http://cloudcompare.org/forum/viewtopic ... t=10#p4973

Re: XERCES not found

Posted: Mon Jul 20, 2015 7:05 am
by daniel
I can't read Spanish errors sorry ;)

Have you tried to add the fpic option as suggested?

Re: XERCES not found

Posted: Mon Jul 20, 2015 12:57 pm
by jgpallero
daniel wrote:I can't read Spanish errors sorry ;)

Have you tried to add the fpic option as suggested?
Daniel, I was finally able to compile CC with E57 support in linux. I've summarized the steps in a new thread (viewtopic.php?f=12&t=1322). It was needed the modification of an include line in a *.cpp file, that I think it should be modified also in the CC git trunk

Thanks