Hi Enric,

It seems that you are using a new version of GCC and thus using the new ABI of the libstdc++. If you want your project to work you need to add the macro: |#define _GLIBCXX_USE_CXX11_ABI 0 |in your .cxx .

(https://stackoverflow.com/questions/33394934/converting-std-cxx11string-to-stdstring?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa)


You do not need the include directories cmake macro as it is done by the OTB find package .


I hope this will help!


Antoine

On 18/04/2018 17:33, EnricF_CTTC wrote:

Hello everybody,

I have found some issues with the installation of OTB-6.4 from OTB webpage (https://www.orfeo-toolbox.org/) and an initial simple application compilation using CMake on a VM GNU/Linux Ubuntu 16.04 distribution.

Although I follow the installation guide: https://www.orfeo-toolbox.org/packages/OTBSoftwareGuide.pdf

and the Building Simple Application tutorial from the Software guide: https://www.orfeo-toolbox.org/SoftwareGuide/SoftwareGuidech4.html

It never compiles ("make" command). I am frustrated because it seems the most basic compilation possible but the OTB guides I have found are someway contradictory (some guides talk about folders I don't have, for example, the Examples folders is not in my installation).

I have created a folder for this purpose from where I execute the make commands and I have the cxx file with the C++ sample code:
${Home}/workspace/otb_tutorials

and attached into this message you can find the CMakeLists.txt and HelloWorldOTB.cxx files that were copied from the Simple Application tutorial previously mentioned plus the output message (error_message_make.txt) after executing the "make" command.

In my opinion, a way of solving this (partially), may be the addition of following lines into the CMakeList.txt file:

INCLUDE_DIRECTORIES(${HOME}/workspace/OTB-6.4.0-Linux64/include)
INCLUDE_DIRECTORIES(${HOME}/workspace/OTB-6.4.0-Linux64/include/boost-1_60)
INCLUDE_DIRECTORIES(${HOME}/workspace/OTB-6.4.0-Linux64/include/ITK-4.12)

Which passes the "cmake .\" command (in both cases this command is succesfull) but also outputs some errors in the "make" command.

I have been working with QGIS lately, not very deeply but it is useful for some of my research related to precision agriculture. I would like to create my own software C++ using OTB. So if anyone can help me it will be very useful for me but maybe also for others beginners with OTB.


Thank you very much in advance for your time reading this ( and maybe answering :-D ),
Enric.


--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to