加载了CxImage类以后,编译能通过,连接的时候报错。我就想简单测试一下看能否使用,如下代码:
#include<iostream>
#include "ximage.h"
int main()
{
CxImage image;
image.Load("lena.bmp",CXIMAGE_FORMAT_BMP);
return 0;
}
连接出现如下四个错误:
Linking...
try.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Load(char const *,unsigned long)" (?Load@CxImage@@QAE_NPBDK@Z)
try.obj : error LNK2001: unresolved external symbol "public: __thiscall CxImage::CxImage(unsigned long)" (??0CxImage@@QAE@K@Z)
try.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Destroy(void)" (?Destroy@CxImage@@QAE_NXZ)
Debug/try.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.try.exe - 4 error(s), 0 warning(s)
请问是哪里出了问题,是不是哪里没有设置好,还是稳健还没有配置好啊 ??
谢谢了
#include<iostream>
#include "ximage.h"
int main()
{
CxImage image;
image.Load("lena.bmp",CXIMAGE_FORMAT_BMP);
return 0;
}
连接出现如下四个错误:
Linking...
try.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Load(char const *,unsigned long)" (?Load@CxImage@@QAE_NPBDK@Z)
try.obj : error LNK2001: unresolved external symbol "public: __thiscall CxImage::CxImage(unsigned long)" (??0CxImage@@QAE@K@Z)
try.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Destroy(void)" (?Destroy@CxImage@@QAE_NXZ)
Debug/try.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.try.exe - 4 error(s), 0 warning(s)
请问是哪里出了问题,是不是哪里没有设置好,还是稳健还没有配置好啊 ??
谢谢了
解决方案 »
- 年30了都来求职!
- 能不能开个Xtreme toolkit 的专区呢?
- 现在GIS最流行的编程语言是什么啊?
- 学习COM技术内幕时想弄清COM内的执行顺序,请大家帮忙解答,一部分自己已经弄清,大家也可以来学习指正
- 求救..在SDI程序(资源管理器样式)中,左边窗口如何给右边窗口发送OnDraw消息啊???在线等
- 奇怪的build 问题
- 问一个简单的按钮刷新的问题
- 请问如何在程序中得到JPG,GIF,BMP的图像尺寸
- 数据类型转换?? !!!@
- 作了一个应用程序,怎样做他的安装程序,最好有详细说明
- win2000上使用客户端软件访问服务器的数据库失败!!!急!!!
- 求助Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll
如果是dll的话,要在工程里包含这个dll
在VS2008以上的版本Linker->General->Additional Include Directories
这个最好指定一下
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
try.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CxImage::Load(char const *,unsigned long)" (?Load@CxImage@@QAE_NPBDK@Z)
Debug/try.exe : fatal error LNK1120: 1 unresolved externals
Load有问题,是不是哪里还有个什么文件没有弄过去,但是我看了下,好像又没有少什么文件了。