QGIS编译过程问题总结

编译环境: qgis3.16.7+win11+vs2015+cmake3.24.1

按照官网进行配置。

       便捷配置:在 CMAKE 中添加 CMAKE_PREFIX_PATH

CMAKE_PREFIX_PATH=C:/cygwin64/bin;C:/OSGeo4W64;C:/OSGeo4W64/apps/Qt5;C:/OSGeo4W64/apps/Python37

编译问题汇总:

1、Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

     解决:a. 删除C:/cygwin64/bin/pkg-config

                b. 复制C:/cygwin64/bin/pkgconf.exe,并重命名为pkg-config

2、SETUPAPI_LIBRARY 和 VERSION_LIBRARY生成工程可能不无使用问题:

     解决:a.找到 C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib/

                b.SETUPAPI_LIBRARY 设置为a目录下的 SetupAPI.Lib

                c.VERSION_LIBRARY 设置为a目录下的 Version.Lib

3、“Fatal Python error : initfsencoding: unable to load the file system codec”错误

     解决:添加环境变量  变量名 PYTHONHOME,变量值 C:\OSGeo4W\apps\Python37

4、CMake Error at cmake/FindPyQt5.cmake:55 (MESSAGE): Could not find PyQt5

    解决:修改c:\OSGeo4W64\apps\Python37\lib\site-packages\sipconfig.py中的_pkg_config段配置路径。

# These are installation specific values created when SIP was configured.
_pkg_config = {
    'arch':               '',
    'default_bin_dir':    'C:\\OSGeo4W64\\apps\\Python37',
    'default_mod_dir':    'C:\\OSGeo4W64\\apps\\Python37\\Lib\\site-packages',
    'default_sip_dir':    'C:\\OSGeo4W64\\apps\\Python37\\sip',
    'deployment_target':  '',
    'platform':           'win32-msvc2015',
    'py_conf_inc_dir':    'C:\\OSGeo4W64\\apps\\Python37\\include',
    'py_inc_dir':         'C:\\OSGeo4W64\\apps\\Python37\\include',
    'py_lib_dir':         'C:\\OSGeo4W64\\apps\\Python37\\libs',
    'py_version':         0x030700,
    'qt_framework':       0,
    'sip_bin':            'C:\\OSGeo4W64\\apps\\Python37\\Scripts\\sip',
    'sip_config_args':    '--destdir C:\\OSGeo4W64\\apps\\Python37\\lib\\site-packages --bindir C:\\OSGeo4W64\\apps\\Python37\\Scripts --incdir C:\\OSGeo4W64\\apps\\Python37\\include',
    'sip_inc_dir':        'C:\\OSGeo4W64\\apps\\Python37\\include',
    'sip_module_dir':     'C:\\OSGeo4W64\\apps\\Python37\\lib\\site-packages',
    'sip_root_dir':       'C:\\OSGeo4W64\\apps\\Python37\\lib\\site-packages',
    'sip_version':        0x04130e,
    'sip_version_str':    '4.19.14',
    'universal':          ''
}

5、编译过程中的其它的问题,需要核对源码的编码格式

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值