• Windows libQGLViewer2.7.0,libQGLViewer2.6.2与g2o20160427, g2o20170730编译生成G2O


    1. Win10, VS2013, libQGLViewer2.6.2 和 QT5.6.3编译时候会出错,初步判断libQGLViewer2.6.2不支持QT5

    错误    73    error LNK1120: 50 个无法解析的外部命令    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerdebug\QGLViewerd2.dll    QGLViewer
    错误    6    error LNK2001: 无法解析的外部符号 __imp__glBegin@4    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerkeyFrameInterpolator.obj    QGLViewer
    错误    7    error LNK2001: 无法解析的外部符号 __imp__glBegin@4    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerqglviewer.obj    QGLViewer
    错误    39    error LNK2001: 无法解析的外部符号 __imp__glDisable@4    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerqglviewer.obj    QGLViewer
    错误    9    error LNK2001: 无法解析的外部符号 __imp__glEnd@0    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerkeyFrameInterpolator.obj    QGLViewer
    错误    10    error LNK2001: 无法解析的外部符号 __imp__glEnd@0    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerqglviewer.obj    QGLViewer
    错误    12    error LNK2001: 无法解析的外部符号 __imp__glFrustum@48    D:PackagesG2OlibQGLViewer-2.6.2QGLViewersaveSnapshot.obj    QGLViewer
    错误    41    error LNK2001: 无法解析的外部符号 __imp__glLineWidth@4    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerqglviewer.obj    QGLViewer
    错误    14    error LNK2001: 无法解析的外部符号 __imp__glLoadIdentity@0    D:PackagesG2OlibQGLViewer-2.6.2QGLViewerqglviewer.obj    QGLViewer
    ...
    ...

    解决方式: 将libQGLViewer换成2.7.0版本正常编译可以生成QGLViewer2.dll、QGLViewer2.lib(release版)和  QGLViewerd2.dll、QGLViewerd2.lib(debug版)了

    2. 如果是用Win10, VS2008(不支持C11), libQGLViewer2.6.2和QT4.7.1则不会报错

    3. 动态库的放置位置

    dll拷贝至系统文件夹 32位是C:WindowsSystem32,64位是C:WindowsSysWOW64可以将编译的64位版本动态库放置到此位置

    4. libQGLViewer2.7.0和g2o20160427和g2o20170730不兼容因为,错误如下

    错误    19    error C2039: “updateGL”: 不是“g2o::G2oQGLViewer”的成员    

    错误原因QGLViewer2.7.0更新如下导致出现此问题,导致最后g2o_viewer库难以生成

    QGLViewer extends QOpenGLWidget instead of the deprecated QGLWidget (huge thanks to Gianluca).
    Although there are minor differences between the two classes, the switch should be mostly invisible.
    Using update() instead of updateGL() is one of them.
    The renderText methods were backported to maintain backward compatibility.
    Some overloaded constructors (using a QGLFormat or a sharedWidget) are deprecated since they have no equivalent.

    解决方式:将报错中updateGL()替换成update()即可顺利编译生成g2o_viewer或者利用QT4和低版本的libQGLViewer编译不会产生这种问题

  • 相关阅读:
    Linux之HugePages快速配置
    Bug 5323844-IMPDP无法导入远程数据库同义词的同义词
    Oracle之SQL优化专题02-稳固SQL执行计划的方法
    使用COE脚本绑定SQL Profile
    AIX挂载NFS写入效率低效解决
    javaWeb项目配置自定义404错误页
    eclipse Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-3.0.xsd)
    tomcat Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
    orcle not like不建议使用(not like所踩过的坑!)
    eclipse debug调试 class文件 Source not found.
  • 原文地址:https://www.cnblogs.com/flyinggod/p/8041374.html
Copyright © 2020-2023  润新知