zoukankan      html  css  js  c++  java
  • Ogre1.6.5 编译链接错误之FreeImage

    这两天想重新学习下ogre,但是在vs2010上编译1.6.5的版本上遇到链接失败的问题,耗了不少时间这里记一下。

    主要是一些重定义报错。

    >msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z) 已经在 FreeImaged.lib(half.obj) 中定义。

    失败环境:

    OgreMain是debug版的dll动态库工程,runtime library选的是"多线程调试 DLL (/MDd)"。FreeImage选择的是对应的3.10.0。并且FreeImageLib工程的runtime library也是"多线程调试 DLL (/MDd)"。

    按道理来说是不应该出现链接错误的,因为是lib工程和最终需要的dll工程的配置是一样的。

    问题和解决方法:

    FreeImageLib工程编译出的lib库有问题,不能只把FreeImageLib的runtime library设置为"多线程调试 DLL (/MDd)",需要把它依赖的所有FreeImage工程的Runtime Library都设置为"多线程调试 DLL (/MDd)"。

    FreeImage工程如下:

    runtime配置如下:

     另外对应版本的ogre和freeimage源代码可以去sourceforge上搜索。

     

  • 相关阅读:
    android videoView 加载等待
    LocalBroadcastManager
    sessionStorage 、localStorage
    javascript 数组、json连接
    properties 文件注意事项
    nutz 使用beetl
    [Git/Github] ubuntu 14.0 下github 配置
    【UNIX环境编程、操作系统】孤儿进程和僵尸进程
    【操作系统】进程间通信
    【操作系统】线程
  • 原文地址:https://www.cnblogs.com/beeasy/p/6079162.html
Copyright © 2011-2022 走看看