E57 Support - Extended Instructable?

For any question about plugins!
Charlesw
Posts: 45
Joined: Mon Apr 10, 2017 3:54 pm

E57 Support - Extended Instructable?

Post by Charlesw »

Trying to add in E57 support during compilation. I am new to cmake and the process as this similar issue arose when compiling cc source code. Is there a more defined/ comprhensive instruction list on adding E57 support when compiling.

I have downloaded Boost, LibE57, Xerces. Should I have binaries or source code for most of these?

Specific folder structure/ files which cmake is looking for?

I loaded xerces into VS, changed static debug and static release per instructions. Built. copied the output (a .lib file and a file called "obj" which contains numerous obj files). I performed this build for both x64 and x86 in static debug and static release just to be sure I had the right files. I then organized the output files as follows:
temporaryfolderXerces ->
/include ->
x64 ->
debug ->
obj folder that was output for x64 static debug
release->
obj folder that was output for x64 static release
x86 ->
debug ->
obj folder that was output for x86 static debug
release->
obj folder that was output for x86 static release


/lib ->
x64 ->
.lib file that was output for x64 static debug
.lib file that was output for x64 static release
x86 ->
.lib file that was output for x86 static debug
.lib file that was output for x86 static release
I am unsure what comes after this or if this was even done correct as I am unable to get cmake to do anything at this point.

Do I need to build boost or just refer to the root in cmake when asked for it? (What is the root of Boost, cmake continually says it is unable to find a valid root or is incompatible with current version)
Charlesw
Posts: 45
Joined: Mon Apr 10, 2017 3:54 pm

Re: E57 Support - Extended Instructable?

Post by Charlesw »

I also wanted to ask a question pertaining to computation speeds.

version 2.6 seems to calculate at least 10-20x faster than 2.9beta. I compiled 2.9beta straight from the source code with no add ins.

2.9 beta is running incredibly sluggish in comparison to the official release of 2.6.

Is this something that went wrong during compilation, building, or source code?
daniel
Site Admin
Posts: 7747
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 Support - Extended Instructable?

Post by daniel »

On my side, when I compile XercesLib (part of the 'xerces-all' solution that can be found under '/projects/Win32/VCXX'), I get the corresponding library file (xerces-c_static_3.lib) in '/Build/Win64/VCXX/Static Release' when compiling in Release mode. And the equivalent debug file when compiling in Debug mode (in 'Static Debug').

Then:
- I create a new folder (e.g. xerces-c-3.1.1_msvcXX_64)
- I create a sub folder called 'lib' . I only need to copy the two '.lib' files there
- I create another sub folder called 'include' with the files that are in the 'src' folder in the original distribution
- eventually I set Xerces_INCLUDE_DIR to point to the 'include' folder and Xerces_LIBRARY_DEBUG and Xerces_LIBRARY_RELEASE to point to the two library files in the 'lib' folder

Otherwise I don't build boost (I use precompiled binaries). If CMake can't find the BOOST_ROOT, then you have to define the BOOST_LIBRARYDIR and make it point to the 'lib' folder of your boost distribution (e.g. 'lib64-msvc-12.0' on my side).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7747
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 Support - Extended Instructable?

Post by daniel »

Regarding your second question: it's probably because you are running CloudCompare in 'debug' mode. Try the 'release' mode and it should be ok.
Daniel, CloudCompare admin
Charlesw
Posts: 45
Joined: Mon Apr 10, 2017 3:54 pm

Re: E57 Support - Extended Instructable?

Post by Charlesw »

as for the speeds you are absolutely 100% correct. I did not know debug made that huge of a difference.... thank you.

As for E57 support, I have Xerces setup.

I assume it is at this point i open cmake? source the libe57? create a folder for the E57 Build to output to?

doing the stated steps, it asks for the boost root which returns this error :
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1454 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:67 (find_package)


CMake Error at CMakeLists.txt:77 (message):
Unable to find boost library.

Please set the BOOST_ROOT to point to the boost distribution files.
What do you mean by "If CMake can't find the BOOST_ROOT, then you have to define the BOOST_LIBRARYDIR and make it point to the 'lib' folder of your boost distribution (e.g. 'lib64-msvc-12.0' on my side)."

where would I define this location dir?
daniel
Site Admin
Posts: 7747
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 Support - Extended Instructable?

Post by daniel »

In CMake, use the 'Add entry' button to create a variable of type 'PATH' and named 'BOOST_LIBRARYDIR'. Then make it point to the folder of Boost where all the libraries lie (*.lib files).
Daniel, CloudCompare admin
Charlesw
Posts: 45
Joined: Mon Apr 10, 2017 3:54 pm

Re: E57 Support - Extended Instructable?

Post by Charlesw »

I am sorry Daniel, I am still unable to get cmake to configure the boost files.
Following your previous post I added an entry and regrouped the boost grouping in cmake.

for my version the folder was "lib64-msvc-14.1" and still received the following error. I am pretty sure I am missing something fundamental or pathing an incorrect location.
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1454 (_Boost_MISSING_DEPENDENCIES)
contrib/E57Support.cmake:22 (find_package)
contrib/AllSupport.cmake:6 (include)
CMakeLists.txt:89 (include)


CMake Error at contrib/E57Support.cmake:27 (message):
Unable to find boost library. Please set BOOST_ROOT to point to the boost
distribution files.
Call Stack (most recent call first):
contrib/AllSupport.cmake:6 (include)
CMakeLists.txt:89 (include)
To be sure I am pathing correctly:
BOOST_ROOT: J:\CloudCompareDev\Support\ExternalSoftware\E57 Support\boost_1_64_0
LIBE57_INSTALL_DIR: J:\CloudCompareDev\Support\ExternalSoftware\E57 Support\E57RefImpl_src-1.1.312\E57RefImpl_src-1.1.312
BOOST_LIBRARYDIR: J:\CloudCompareDev\Support\ExternalSoftware\E57 Support\boost_1_64_0\lib64-msvc-14.1
Charlesw
Posts: 45
Joined: Mon Apr 10, 2017 3:54 pm

Re: E57 Support - Extended Instructable?

Post by Charlesw »

Additional Question: It is my understanding that if one wants the plugin they make to work for the official release as a "drop in" dll, it must be setup using the same msvc and qt as the official which is found under the about/help menu. Is this the only way to make a dll "drop and play". I ask because I believe the official CC was compiled using VS2012, which to my understanding is not available for free, unlike VS2015.
daniel
Site Admin
Posts: 7747
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 Support - Extended Instructable?

Post by daniel »

You are right, but the compiler/IDE used is MSVC 2013 (which corresponds to version 12 of Visual ;). This one should be available for free.

Another option is that I compile the plugin myself, but it's only for 'public' plugins of course.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7747
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 Support - Extended Instructable?

Post by daniel »

Regarding the boost library folder, can you list a few files there? (they might not have been compiled with the right configuration).
Daniel, CloudCompare admin
Post Reply