<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">On Friday 05 November 2010 09:49:46 am rafael.mejias@sinfogeo.com wrote:<br>
&gt; Buenos días,<br>
&gt; estoy desarrollando una aplicación c++ de QGis en windows xp con QT, y<br>
&gt; este es mi fichero .pro (es un poco raro pero es que he probado de todo):<br>
&gt; TEMPLATE = app<br>
&gt;<br>
&gt; QT  += core \<br>
&gt;<br>
&gt; gui \<br>
&gt;<br>
&gt; sql \<br>
&gt;<br>
&gt; xml<br>
&gt;<br>
&gt; INCLUDEPATH  += "C:/Archivos de programa/Quantum GIS<br>
&gt; Tethys/apps/qgis/include" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS Tethys/include" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS Tethys/apps/gdal-16/include" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS Tethys/apps/Python25/include" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS<br>
&gt; Tethys/apps/grass/grass-6.4.0svn/include" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS<br>
&gt; Tethys/apps/Python25/Lib/site-packages/win32/include" \<br>
&gt;<br>
&gt; win32:LIBS  += "C:/Archivos de programa/Quantum GIS<br>
&gt; Tethys/apps/qgis/lib/qgis_core.lib" \<br>
&gt;<br>
&gt; "C:/Archivos de programa/Quantum GIS Tethys/apps/qgis/lib/qgis_gui.lib" \<br>
&gt;<br>
&gt; -L "C:/Archivos de programa/Quantum GIS Tethys/bin" \<br>
&gt;<br>
&gt; -L "C:/Archivos de programa/Quantum GIS Tethys/apps/gdal-16" \<br>
&gt;<br>
&gt; -L "C:/Archivos de programa/Quantum GIS Tethys/apps/msys"<br>
&gt;<br>
&gt; SOURCES  += main.cpp\<br>
&gt;<br>
&gt;          mainwindow.cpp<br>
&gt;<br>
&gt; HEADERS   += mainwindow.h<br>
&gt;<br>
&gt; FORMS     += mainwindow.ui<br>
&gt;<br>
&gt; DEFINES  += GUI_EXPORT= CORE_EXPORT=<br>
&gt;<br>
&gt;<br>
&gt; pero al compilar, tengo esta lista de errores:<br>
&gt; debug/main.o: In function `Z5qMainiPPc':<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:32: undefined<br>
&gt; reference to `QgsApplication::QgsApplication(int&amp;, char**, bool)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:39: undefined<br>
&gt; reference to `QgsProviderRegistry::instance(QString)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:42: undefined<br>
&gt; reference to `QgsVectorLayer::QgsVectorLayer(QString, QString, QString,<br>
&gt; bool)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:45: undefined<br>
&gt; reference to `QgsVectorLayer::geometryType() const'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:45: undefined<br>
&gt; reference to<br>
&gt; `QgsSingleSymbolRenderer::QgsSingleSymbolRenderer(QGis::GeometryType)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:47: undefined<br>
&gt; reference to `QgsVectorLayer::setRenderer(QgsRenderer*)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:48: undefined<br>
&gt; reference to `QgsMapLayer::isValid()'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:57: undefined<br>
&gt; reference to `QgsMapLayerRegistry::instance()'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:57: undefined<br>
&gt; reference to `QgsMapLayerRegistry::addMapLayer(QgsMapLayer*, bool)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:62: undefined<br>
&gt; reference to `QgsMapCanvas::QgsMapCanvas(QWidget*, char const*)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:63: undefined<br>
&gt; reference to `QgsMapLayer::extent() const'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:63: undefined<br>
&gt; reference to `QgsMapCanvas::setExtent(QgsRectangle const&amp;)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:64: undefined<br>
&gt; reference to `QgsMapCanvas::enableAntiAliasing(bool)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:66: undefined<br>
&gt; reference to `QgsMapCanvas::freeze(bool)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:68: undefined<br>
&gt; reference to `QgsMapCanvas::setLayerSet(QList&lt;QgsMapCanvasLayer&gt;&amp;)'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:70: undefined<br>
&gt; reference to `QgsMapCanvas::refresh()'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:73: undefined<br>
&gt; reference to `QgsApplication::~QgsApplication()'<br>
&gt;<br>
&gt; C:\rafa\QT\miApli-build-desktop/../miApli/main.cpp:73: undefined<br>
&gt; reference to `QgsApplication::~QgsApplication()'<br>
&gt;<br>
&gt; c:/qt/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libmingwex.a(pformat.o):p<br>
&gt;format.c:(.text+0x166d): undefined reference to `_get_output_format'<br>
&gt;<br>
&gt; collect2: ld returned 1 exit status<br>
&gt;<br>
&gt; mingw32-make[1]: *** [debug\miApli.exe] Error 1<br>
&gt;<br>
&gt; mingw32-make: *** [debug] Error 2<br>
&gt;<br>
&gt; The process "C:/Qt/mingw/bin/mingw32-make.exe" exited with code %2.<br>
&gt;<br>
&gt; Error while building project miApli (target: Desktop)<br>
&gt;<br>
&gt; When executing build step 'Make'<br>
&gt;<br>
&gt;<br>
&gt; Evidentemente es un problema de rutas y/o dependencias, pero ... ¿puede<br>
&gt; alguien darme más pistas?. Si lo compilo en linux ubuntu (obviamente<br>
&gt; cambiando el .pro), no tengo problemas y lo compila bien.<br>
&gt; En windows no he utilizado el paquete de Osgeo, tengo QT instalado por<br>
&gt; un lado y QGis por otro, en cualquier caso, no parece quejarse de las<br>
&gt; librería QT, sino de las librerías QGis.<br>
&gt;<br>
&gt; Muchas gracias por la ayuda,<br>
&gt; Rafa<br>
Una corazonada, "/" en linux versus "\" windows. Probablemente el make funciona bien en linux porque los paths están bien formado para él, pero al ejecutar el make en windows las "/" de linux, no son interpretados como path correctos en windows.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Espero te sirva. <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>un saludo <br>
-- <br>
Mauricio Pazos<br>
www.axios.es</p></body></html>