Error when compiling simple program

4776
4
Jump to solution
03-29-2015 03:56 PM
FranciscoThibério
New Contributor II

I got these errors when trying compile just a simple program based on ArcGIS for QtCreator. I followed the installation and setup from here:Install and set up on Linux—ArcGIS Runtime SDK for Qt | ArcGIS for Developers​.

The only part from this tutorial that wasn't clear for my was the "Add the path to the ArcGIS Runtime for Qt library files to the environment variable LD_LIBRARY_PATH". Instead of doing this(I don't know how) I just added the library <install location>/arcgis/runtime_sdk/qt10.2.5/sdk/linux/x64/lib to .pro file. I have added some pictures that shows the project configuration.

I kind new in Ubuntu and ArcGIS, sorry.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Francisco-

That should work. libc++.so.1 is in that same directory. I'll suggest one more hack to try, but if this doesn't work, I suggest you contact Esri Support Services to troubleshoot it further, as there may be some back and forth involved.

cd to ~/arcgis/runtime_sdk/qt10.2.5/sdk/linux/x64/lib (or wherever it was installed to)

ln -s libc++.so.1 libc++.so # create symlink so we can explicitly link the clang runtime library

in Qt project file, add: LIBS += -lc++'

That should work, but what you were doing before should work as well.

Thanks,

Luke

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

Hey Francisco,

Regarding setting LD_LIBRARY_PATH, as specified in the help here... Install and set up on Linux—ArcGIS Runtime SDK for Qt | ArcGIS for Developers

You can go about doing this in a few different ways:

1) In Qt Creator, go to your Projects tab on the left side, scroll down to Build Environment, and click Add to add a new environment variable for LD_LIBRARY_PATH=/<path_to_ArcGIS_SDK>/x64/lib.

2) Create a .sh script that first sets this environment variable, then launches Qt Creator. Then use this whenever you launch Qt Creator

ex:

export LD_LIBRARY_PATH=/<path_to_ArcGIS_SDK>/x64/lib

sh /<path_to_qt_creator/bin/qtcreator.sh

3) Add the following to your bash profile

export LD_LIBRARY_PATH=/<path_to_ArcGIS_SDK>/x64/lib

Basically, one way or another you need to set the LD_LIBRARY_PATH environment variable equal to the location of your x64/lib folder in your ArcGIS Runtime SDK for Qt location.

Thanks,

Luke

FranciscoThibério
New Contributor II

Hi Lucas,

Thanks for answering that quickly. I used the first method that you mentioned, as picture below shows.

However the errors keep happening. Looks like is missing the libc++.so.1 library, however the file is in the same directory of libEsriRuntimeQt.so but I can't add it to project file. Actually I think they are shared library’s. Here is the message when I try to compile:

"warning: libc++.so.1, needed by /home/thiberi0/untitled1/../arcgis/runtime_sdk/qt10.2.5/sdk/linux/x64/lib//libEsriRuntimeQt.so, not found (try using -rpath or -rpath-link)"

I don't know how to use this "-rpath" command, can you help me?

Screenshot from 2015-03-30 22:57:11.png

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Francisco-

That should work. libc++.so.1 is in that same directory. I'll suggest one more hack to try, but if this doesn't work, I suggest you contact Esri Support Services to troubleshoot it further, as there may be some back and forth involved.

cd to ~/arcgis/runtime_sdk/qt10.2.5/sdk/linux/x64/lib (or wherever it was installed to)

ln -s libc++.so.1 libc++.so # create symlink so we can explicitly link the clang runtime library

in Qt project file, add: LIBS += -lc++'

That should work, but what you were doing before should work as well.

Thanks,

Luke

FranciscoThibério
New Contributor II

Thank you very much Lucas!

This worked.

0 Kudos