各位高手,小弟最近设计一个游戏的时候,用到3ds loader。里面要用jpeg.lib来处理jpeg texture。我用的是vs2005。我从网上下载jpegsr6.zip,然后再vc++6.0里面编译输出成jpeg.lib。但是当我把这个lib加载到我的vs2005里面后程序总是出错。还请大家帮忙看看。ScreenBase.h#ifndef _SCREEN_BASE
#define _SCREEN_BASE#include <stdio.h>extern "C" {
#pragma comment(lib, "data/lib/jpeg.lib")
    FILE _iob[3] = {__iob_func()[0], __iob_func()[1], __iob_func()[2]};
    }
//======================================================================================ScreenBase.obj : error LNK2005: __iob already defined in testMain.obj
C3dsLoader.obj : error LNK2005: __iob already defined in testMain.obj
CLoad3DS.obj : error LNK2005: __iob already defined in testMain.obj
G_3dMath.obj : error LNK2005: __iob already defined in testMain.obj
C3dsLoader.obj : error LNK2019: unresolved external symbol _auxDIBImageLoadW@4 referenced in function "public: void __thiscall C3dsLoader::Texture_3ds(unsigned int * const,char *,int)" (?Texture_3ds@C3dsLoader@@QAEXQAIPADH@Z)
C:\Users\charles\Documents\Visual Studio 2005\Projects\testOpenGL\Debug\testOpenGL.exe : fatal error LNK1120: 1 unresolved externals
多谢大家指教!!!
我在网上找到一篇介绍如何编译jpeg.lib的材料,不过我是新手,还不能完全理解上面所说的东西,我给个链接,供大家参考。
http://huibei83.spaces.live.com/blog/cns!8D43656221071710!176.entry