CxImage链接出错
按照官方的配置方法配置以后,写了一个测试程序。
Project Settings
|- C/C++
| |- Code Generation
| | |- Use run-time library : Multithreaded DLL (must be the same for
| | | all the linked libraries)
| | |- Struct member alignment : must be the same for all the linked
| | | libraries
| |- Precompiled headers : not using precompiled headers
| |- Preprocessor
| |- Additional Include Directories: ..\cximage
|- Link
|- General
|- Object/library modules: ../png/Debug/png.lib
../raw/Debug/libdcr.lib
../jpeg/Debug/jpeg.lib
../zlib/Debug/zlib.lib
../tiff/Debug/tiff.lib
../jasper/Debug/jasper.lib
../cximage/Debug/cximage.lib ...
测试程序:
#include<iostream>
#include "ximage.h"
using namespace std;
int main()
{
CxImage image;
image.Load("lena.bmp",CXIMAGE_FORMAT_BMP);
cout<<"HELLO WORLD !"<<endl;
return 0;
}
编译可以通过。但是链接出错。
错误如下:
Linking...
cximage_use.obj : error LNK2001: unresolved external symbol "public: __thiscall CxImage::CxImage(unsigned long)" (??0CxImage@@QAE@K@Z)
cximage_use.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Destroy(void)" (?Destroy@CxImage@@QAE_NXZ)
cximage_use.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::DestroyFrames(void)" (?DestroyFrames@CxImage@@QAE_NXZ)
Debug/cximage_use.exe : fatal error LNK1120: 3 unresolved externals
请问,是不是还有什么文件没有加进去呀。
谢了。