请问下面的编译错误怎么要解决?
我在http://www.3dmirc.com/apron/tutorials/gl/gl_3ds_loader.zip
下载了一个读取3ds文件的程序,他是用api函数的,我想用mfc ,我建立了一个单文档后,先添加了一个cjpegfile 这个类,内容照抄例子的,但是编译这个cjpegfile.CPP的时候出现下面的
错误如下:
cjpegfile.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl jpeg_finish_decompress(struct jpeg_decompress_struct *)" (?jpeg_finish_decompress@@YAEPAUjpeg_decompress_struct@@@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl jpeg_read_scanlines(struct jpeg_decompress_struct *,unsigned char * *,unsigned int)" (?jpeg_read_scanlines@@YAIPAUjpeg_decompress_struct@@PAPAEI@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl jpeg_start_decompress(struct jpeg_decompress_struct *)" (?jpeg_start_decompress@@YAEPAUjpeg_decompress_struct@@@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "int __cdecl jpeg_read_header(struct jpeg_decompress_struct *,unsigned char)" (?jpeg_read_header@@YAHPAUjpeg_decompress_struct@@E@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_stdio_src(struct jpeg_decompress_struct *,struct _iobuf *)" (?jpeg_stdio_src@@YAXPAUjpeg_decompress_struct@@PAU_iobuf@@@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_CreateDecompress(struct jpeg_decompress_struct *,int,unsigned int)" (?jpeg_CreateDecompress@@YAXPAUjpeg_decompress_struct@@HI@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_destroy_decompress(struct jpeg_decompress_struct *)" (?jpeg_destroy_decompress@@YAXPAUjpeg_decompress_struct@@@Z)
cjpegfile.obj : error LNK2001: unresolved external symbol "struct jpeg_error_mgr * __cdecl jpeg_std_error(struct jpeg_error_mgr *)" (?jpeg_std_error@@YAPAUjpeg_error_mgr@@PAU1@@Z)
Debug/text_3ds.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
其中 CJPEGFile.CPP
#include "CJPEGFile.h"
#include "data\include\define.h"
#include <stdio.h>
#include <setjmp.h>
#include "data\include\jpeglib.h"
我查了msdn里面好像有这样的解析
EXPORTS definitions
This statement makes one or more definitions available as exports to other programs.
EXPORTS marks the beginning of a list of export definitions. Each definition must be on a separate line. The EXPORTS keyword can be on the same line as the first definition or on a preceding line. The .DEF file can contain one or more EXPORTS statements.
The syntax for an export definition is:
entryname[=internalname] [@ordinal[NONAME]] [DATA] [PRIVATE]
The optional keyword PRIVATE prevents entryname from being placed in the import library generated by LINK. It has no effect on the export in the image also generated by LINK.
There are three methods for exporting a definition, listed in recommended order of use:
The __declspec(dllexport) keyword in the source code
An EXPORTS statement in a .DEF file
An /EXPORT specification in a LINK command
All three methods can be used in the same program. When LINK builds a program that contains exports, it also creates an import library, unless an .EXP file is used in the build.
请问这个问题怎么样解决?谢谢?