[Qgis-developer] Compilation qgis2.7.0 with VS2010 and Qt 5.3.2

Matthias Kuhn matthias.kuhn at gmx.ch
Tue Dec 23 07:22:33 PST 2014


Hi Anatoliy,

Does that mean that it worked fine before PR #1743?
In general Qt5 support is still pretty new and did not receive much
testing. I don't know how many people have run such a setup on Windows.
It requires to also link dependencies like qwt, qwtpolar and qscintilla
against Qt5.
That said, it is very welcome if people test and improve Qt5 support.
But if you want to stay out of the way of problems you are better off if
you stick to the well-tested Qt4.

Anyway, the problem you have here looks like a linker problem to the
MSVCRT, so Windows specific and not Qt5 specific. As I seldom use
Windows I can't offer more help than this hint, sorry.

Regards,
Matthias

On 12/23/2014 02:34 PM, Anatoliy Golubev wrote:
> Hi list!
> Im trying to compile qgis 2.7.0 with Qt 5.3.2. After applying PR #1743
> all compiles fine (except qspatialite), but linking executables failed
> with errors like this:
>
>        Link:
>          C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe
> /ERRORREPORT:PROMPT
> /OUT:"D:\Projects\other\qgis\qt5\build-debug\output\Debug\qgis_help.exe"
> /INCREMENTAL /NOLOGO
> /LIBPATH:"D:/Projects/other/qgis/qt5/build-debug/src/core"
> /LIBPATH:"D:/Projects/other/qgis/qt5/build-debug/src/core/Debug"
> /LIBPATH:"D:/Projects/other/qgis/qt5/build-debug/src/gui"
> /LIBPATH:"D:/Projects/other/qgis/qt5/build-debug/src/gui/Debug"
> kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
> ..\core\Debug\qgis_core.lib d:\OSGeo4w\root\lib\sqlite3_i.lib
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Concurrentd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5PrintSupportd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Svgd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Xmld.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5WebKitWidgetsd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Widgetsd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5WebKitd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Guid.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Networkd.lib"
> "C:\Qt\Qt-online\5.3\msvc2010_opengl\lib\Qt5Cored.lib" wsock32.lib
> "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\SetupAPI.Lib"
> "C:\Qt\QScintilla-2.8.4\build-vs2010-qt5.3.2-debug\lib\qscintilla2d.lib"
> d:\OSGeo4w\root\lib\proj_i.lib d:\OSGeo4w\root\lib\geos_c.lib
> d:\OSGeo4w\root\lib\gdal_i.lib d:\OSGeo4w\root\lib\spatialindex_i.lib
> d:\OSGeo4w\root\lib\libexpat.lib d:\OSGeo4w\root\lib\sqlite3_i.lib
> d:\OSGeo4w\root\lib\spatialite_i.lib /MANIFEST
> /ManifestFile:"qgis_help.dir\Debug\qgis_help.exe.intermediate.manifest"
> /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
> /PDB:"D:/Projects/other/qgis/qt5/build-debug/output/Debug/qgis_help.pdb"
> /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
> /IMPLIB:"D:/Projects/other/qgis/qt5/build-debug/src/helpviewer/Debug/qgis_help.lib"
> /MACHINE:X86 qgis_help.dir\Debug\qgis_win32.res
>          qgis_help.dir\Debug\qgis_help.exe.embed.manifest.res
>          qgis_help.dir\Debug\main.obj
>          qgis_help.dir\Debug\qgshelpviewer.obj
>          qgis_help.dir\Debug\moc_qgshelpviewer.obj
>          qgis_help.dir\Debug\qrc_images.obj  /machine:X86 /debug
>      1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external
> symbol _WinMain at 16 referenced in function ___tmainCRTStartup
>      1>D:\Projects\other\qgis\qt5\build-debug\output\Debug\qgis_help.exe
> : fatal error LNK1120: 1 unresolved externals
>      1>Done Building Project
> "D:\Projects\other\qgis\qt5\build-debug\src\helpviewer\qgis_help.vcxproj"
> (build target(s)) -- FAILED.
>
> After some googling i find suggestion to change /SUBSYSTEM to CONSOLE,
> but i dont think that this can help.
> Any thoughts?
>
> System: Win 7 x86, VS2010, CMake 3.1.0, Qwt 6.1.1, Qwtpolar 1.1.1,
> QScintilla 2.8.4, other libs from OSGeo4w
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list