[QGIS-Developer] windows build qsci dll issues
Nyall Dawson
nyall.dawson at gmail.com
Mon Sep 16 15:47:22 PDT 2019
On Tue, 17 Sep 2019 at 06:43, Alexis R.L. <alroyliz0 at gmail.com> wrote:
>
> Greetings,
>
> I've been trying to build on windows and I'm having issues with python. I have set the python exe in cmake to the python 3.7 in osgeo apps (and not the python3 in bin since that was causing issues), the pythonpath and pythonhome also point to the python in osgeo/bin but when it comes time to execute "from PyQt5.Qsci import..." I get a dll error.
>
> I have used pip to download qscintilla and the sip bindings again, but this did not change anything.
>
> Has anyone else had that issue? Where is this dll so that I can add it to my Path environment?
I can't help with this particular issue. But for reference, here's my
"just works" from-scratch Windows build process, using Qt Creator. No
warranty, zero support! If it works for you it works ;)
Rough notes only...
- I install MS Visual Studio community 2015, just the c++ language
related parts (using
http://download.microsoft.com/download/D/2/3/D23F4D0F-BA2D-4600-8725-6CCECEA05196/vs_community_ENU.exe)
- I install cmake (64 bit) and add that to the windows path
- I download ninja and shove ninja.exe in c:\program files\cmake\bin
(yep - can't get this to work otherwise!)
- I use cygwin (64 bit) to install flex and bison
- I use osgeo4w 64 bit, installed to the default location. I use this
to install qgis-dev-deps
- I personally install WSL and ubuntu for windows, and use that for
git and stuff. It won't affect things, but I find it easier to use
this to get sipify etc up and running because I can just use ubuntu
bash commands...
In qt creator kits:
- Qt versions: manually add C:\OSGeo4W64\apps\Qt5\bin\qmake.exe
- Compilers: should autodetect the msvc stuff, e.g. Microsoft Visual
C++ Compiler 14.0 (x86) under C:\Program Files (x86)\Microsoft Visual
Studio 14.0\VC\vcvarsall.bat x86 . Should be about 14 entries here,
automatically populated
- Debuggers: Should autodetect C:\Program Files (x86)\Windows
Kits\10\Debuggers\x86\cdb.exe and C:\Program Files (x86)\Windows
Kits\10\Debuggers\x64\cdb.exe
- Cmake: should autodetect C:\Program Files\CMake\bin\cmake.exe ,
otherwise manually add it
Kits:
- manually add a new kit:
- compiler: set both c and c++ to Microsoft Visual C++ Compiler 14.0
(x86_amd64) (make sure it's the 64 bit one!)
- debugger and qt version: set to above ones
- cmake - set to system cmake, as above. Change generator to "ninja"
- Click "Change" next to environment, and insert:
GDAL_DATA=c:\osgeo4w64\share\gdal
GDAL_DRIVER_PATH=c:\osgeo4w64\bin\gdalplugins
PATH=c:\program
files\cmake\bin;C:\cygwin64\bin;C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\Python37;C:\OSGeo4W64\apps\Python37\Scripts;c:\osgeo4w64\apps\qt5\bin;C:\OSGeo4W64\apps\Python37\sip\PyQt5\;${PATH}
PYTHONHOME=C:\OSGeo4W64\apps\Python37
PYTHONPATH=
QGIS_INSTALL_PATH=c:\osgeo4w64\apps\qgis-dev
QML2_IMPORT_PATH=C:\OSGeo4W64\apps\Qt5\qml
QT_PLUGIN_PATH=C:\OSGeo4W64\apps\qgis-dev\qtplugins;C:\OSGeo4W64\apps\Qt5\plugins
Phew.
Now open the qgis project. In the cmake config, set CMAKE_BUILD_TYPE
to "RelWithDebInfo". Make sure your build environment looks good, i.e.
has the above entries.
Build! Cross fingers and close eyes...
Nyall
More information about the QGIS-Developer
mailing list