sample project not compliing, map.h not found

8657
20
03-16-2014 03:21 PM
DrewDowling
Occasional Contributor III
Hello
Using Ubuntu 12.4. I've installed the QT runtime SDK and QT creator 5.2.2, the latest ESRI QT runtime SDK for Linux and followed the installation instructions. Installation went fine and I was able to open the ESRI sample project. However when I try to compile it I get an error at the first include statement referencing am esri header file. So for example "#include map.h" gives the error "map.h not found". So how do I reference the ESRI runtime files in QT creator?

I'm new to QT and developing on a Linux environment so I'm probably missing something obvious. Any help greatly appreciated.
0 Kudos
20 Replies
FabianHeredia
New Contributor II

Thanks Jen

Questions:

1. when I start the script should leave some kind of message, I do not get anything in console

2. when I run QT Creator, open the IDE call an app created with the template and get the same herror:
     / home / XX / XX / miMapa / miMapa.h: 21: error: Map.h: No such file or directory
       # include "Map.h"

3. in console say:

QByteArray ProjectExplorer::runGcc(const Utils::FileName&, const QStringList&, const QStringList&): "/home/fabian/Qt/5.3/gcc_64/bin/qmake" "-xc++ -E -v -" returned exit code 1: "***Unknown option -xc++

"

0 Kudos
JeanneTrieu
Occasional Contributor

Hi Fabian,

As I can see you are using Qt 5.3 with 10.2.3 and we did not fully certify 10.2.3 with Qt 5.3. We know that Qt 5.3 has introduce some display bugs from the Digia side that we are trying to resolve with them.

From the diagnosis that you are giving me, it seems like the prf file is not copied into the Qt 5.3 folder.

Can you following the instruction from this link to integrate qt Creator with the ArcGIS Runtime SDK for Qt https://developers.arcgis.com/qt/guide/integrate-the-sdk-with-qt-creator.htm.

Can you download the Esri-provided Qt 5.1.1 for Linux 64-bit or 32-bit into the desired install location and follow the instruction here https://developers.arcgis.com/qt/guide/install-and-set-up-on-linux.htm.

Let me know if you have any question.

Regards,

Jen Trieu

Product Engineer

Fabian_CamiloHeredia
New Contributor III

thanks Jeanne,

I installed everything again, I no longer get the error console, but still does not recognize my library map.h.
when I create the project in QT console I get the following message:

Project MESSAGE: ArcGIS Runtime for Unix (x86_64)
Project MESSAGE: Version 10.2.3
Project MESSAGE: ArcGIS Runtime for Unix (x86_64)
Project MESSAGE: Version 10.2.3

this tells me that the sdk arcgis was accepted by QT.
when compiled get the error:
/ home/XXX/arcgis/runtime_sdk/qt10.2.3/mi11map/mi11map.h: 21: error: Map.h: No such file or directory
  # include "Map.h"

thanks

0 Kudos
Fabian_CamiloHeredia
New Contributor III
I modified the xx.pro archico and I added the line

INCLUDEPATH += /home/fabian/arcgis/runtime_sdk/qt10.2.3/sdk/include

The project recognizes the references but get the following error:

:-1: error: cannot find -lEsriRuntimeQt

:-1: error: collect2: error: ld returned 1 exit status

Help meeeeee!!!!

0 Kudos
JeanneTrieu
Occasional Contributor

Hi Fabian,

Let's step thru the installation process and see if there is anything missing from your environment:

Did you go https://developers.arcgis.com/qt/guide/integrate-the-sdk-with-qt-creator.htm and follow all the steps in this section: Adding the ArcGIS Runtime SDK for Qt template to Qt Creator?

It looks like step 2: Copying the prf file to  mkspecs\features folder for each of your Qt SDK install locations is not done.

Are you using the template that we provided you in the sdk?

Regards,

Jen Trieu

Product Engineer.

0 Kudos
Fabian_CamiloHeredia
New Contributor III

in step 2 I have the folder only
/ Qt/5.1.1/gcc_64, copy the prf according to guide in mkspecs / features / route file.
if I compile I get the error of the library, add the line to the file. pro
INCLUDEPATH + = / home/fabian/arcgis/runtime_sdk/qt10.2.3/sdk/include
and the error is:

MESSAGE project: ArcGIS Runtime for Unix (x86_64)
Project MESSAGE: Version 10.2.3
g+ +-Wl,-rpath, / home/fabian/Qt/5.1.1/gcc_64-Wl,-rpath, / home/fabian/Qt/5.1.1/gcc_64/lib-o main.o mi11map mi11map.o moc_mi11map. or -L/usr/lib64 -L/ArcGISRuntime10.2.3/Client64-lEsriRuntimeQt -L/home/fabian/Qt/5.1.1/gcc_64/lib-lQt5OpenGL-lQt5Widgets-lQt5Network-lQt5Xml-lQt5Gui-lQt5Core-LGL-lpthread
/ usr / bin / ld: can not find-lEsriRuntimeQt
collect2: error: ld returned 1 exit status
make: *** [mi11map] Error 1
16:19:55: The process "/ usr / bin / make" exited with code 2.
Error while building / deploying project mi11map (kit: GCC 5.1.1 Qt Desktop 64bit)
When executing step 'Make'
16:19:55: Elapsed time: 00:00.

i reinstall in version QT 2.8.1 for qt 5.1.1

i look the library requirements in show that mys SO no have this library:

libX11.so.6

libX11-6

2:1.4.99.1

libXau.so.6

libXau6

1:1.0.6-4

libXext.so.6

libXext6

2:1.3.0

libexpat.so.1

libexpat.so.1

  my Ubuntu is 14.04

0 Kudos
JeanneTrieu
Occasional Contributor

Hi Fabian,

Can you go over the requirement for Ubuntu https://developers.arcgis.com/qt/info/runtime-qt-sdk-ubuntu-required-libs.htm. If you have downloaded the version that Esri provided your Qt folder structure should look like this: /Qt-5.1.1_x64/mkspecs/eatures. Can you upload a picture of your Qt 5.1.1 folder structure and where you have copied your .prf file?

After that you have copied your prf file, you will need to close your Qt creator and restart it using another terminal.

You will still need to "source" and use the same terminal to start QtCreator in order for it to work.

Let me know if it works for you after you have updated your dependencies.

Regards,

Jen Trieu Product Eng.

0 Kudos
Fabian_CamiloHeredia
New Contributor III

foto prf.pngroutQT.png

0 Kudos
Fabian_CamiloHeredia
New Contributor III

hi Jeanne

I installed everything back in 32x platform.
also add the remaining runtime library in the. pro

INCLUDEPATH + = "/ home/fabian/arcgis/runtime_sdk/qt10.2.3/sdk/include"
LIBS + =-L $ $ PWD/../../arcgis/runtime_sdk/qt10.2.3/ArcGISRuntime10.2.3/Client32 /-lEsriRuntimeQt

compile the project and I get 180 errors

/ home/XX/arcgis/runtime_sdk/qt10.2.3/ArcGISRuntime10.2.3/Client32/libEsriRuntimeQt.so: -1: error: undefined reference to `std :: basic_string :: __1 <char, std :: char_traits :: __1 <char>, std :: allocator <char> __1 ::> :: find (const char *, unsigned int, unsigned int) const '
and a warning

: -1: Warning:. So.1 libc + +, needed by /home/xx/Desarrollo/untitled/../../arcgis/runtime_sdk/qt10.2.3/ArcGISRuntime10.2.3/Client32//libEsriRuntimeQt.so, not found (try using-rpath or-rpath-link)

impacts that are virtual machines?

0 Kudos
Fabian_CamiloHeredia
New Contributor III

the solution is:

1. is necesary install g++ is basic

copy 2 files /arcgis/runtime_sdk/qt10.2.3/ArcGISRuntime10.2.3/Client64/

libEsriRuntimeQt.so and libc++.so.1

in /Qt5.1.1/5.1.1/gcc_64/lib/

2. in the project add external library ang go to libEsriRuntimeQt.so in arcgis folder instalation

3. in .pro file add line:

INCLUDEPATH += /home/fabian/arcgis/runtime_sdk/qt10.2.3/sdk/include

0 Kudos