#include <dcmtk\oflog\config.h>
#include <dcmtk\dcmimgle\dcmimage.h>
#include <dcmtk\dcmnet\dicom.h>
#include <dcmtk\config\osconfig.h>
#include <iostream>
#include <fstream>
#include <ostream>
#include <iomanip>
#include<dcmtk\ofstd\ofstream.h>
#include<dcmtk\dcmdata\dctk.h>
int main(int argc, char *argv[])
{
OFLog::configure(OFLogger::INFO_LOG_LEVEL);
DicomImage *image = new DicomImage("E:\\datamining project\\dataset\\Lung CT image\\nodules\\nodules\\23.dcm", CIF_UsePartialAccessToPixelData, 0, 10 /* fcount */);
if (image->getStatus() == EIS_Normal)
{
do {
DCMIMGLE_INFO("processing frame " << image->getFirstFrame() + 1 << " to "<< image->getFirstFrame() + image->getFrameCount());
} while (image->processNextFrames());
}
delete image;
return 0;
}
错误1错误LNK2019:未解析的外部符号&#34; public:__ thiscall OFString ::〜OFString(void)&#34; (?? 1OFString @@ QAE @ XZ)在函数_main c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
中引用错误2错误LNK2019:未解析的外部符号&#34; public:__ thiscall OFString :: OFString(char const *)&#34; (?? 0OFString @@ QAE @ PBD @ Z)在函数_main c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
中引用错误3错误LNK2019:未解析的外部符号&#34;类OFLogger __cdecl DCM_dcmimgleGetLogger(void)&#34; (?DCM_dcmimgleGetLogger @@ YA?AVOFLogger @@ XZ)在函数_main c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
中引用错误4错误LNK2019:未解析的外部符号&#34; public:__ thishisall DicomImage :: DicomImage(char const *,unsigned long,unsigned long,unsigned long)&#34; (?? 0DicomImage @@ QAE @ PBDKKK @ Z)在函数_main c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
中引用错误5错误LNK2019:未解析的外部符号&#34; public:static void __cdecl OFLog :: configure(enum OFLogger :: LogLevel)&#34; (?configure @ OFLog @@ SAXW4LogLevel @ OFLogger @@@ Z)在函数_main c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
中引用错误6错误LNK2019:未解析的外部符号&#34; public:bool __thiscall log4cplus :: Logger :: isEnabledFor(int)const&#34;函数&#34; public中引用了(?isEnabledFor @ Logger @ log4cplus @@ QBE_NH @ Z):bool __thiscall OFLogger :: isEnabledFor(int)const&#34; (?isEnabledFor @OFLogger @@ QBE_NH @ Z)c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
错误7错误LNK2019:未解析的外部符号&#34; public:void __thiscall log4cplus :: Logger :: forcedLog(int,class OFString const&amp;,char const *,int,char const *)const&#34; (?forcedLog @ Logger @ log4cplus @@ QBEXHABVOFString @@ PBDH1 @ Z)在函数&#34中引用; public:void __thiscall OFLogger :: forcedLog(int,class OFString const&amp;,char const *,int,char const *) const&#34; (?forcedLog @ OFLogger @@ QBEXHABVOFString @@ PBDH1 @ Z)c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
错误LNK2019:未解析的外部符号&#34; public:virtual __thiscall log4cplus :: Logger :: ~Logger(void)&#34; (?? 1Logger @ log4cplus @@ UAE @ XZ)在函数&#34; public:virtual __thiscall OFLogger :: ~OFLogger(void)&#34;中引用(?? 1OFLogger @@ UAE @ XZ)c:\ Users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ dcmimage \ dcmimage.obj dcmimage
错误LNK1120:8个未解析的外部c:\ users \ prashant naresh \ documents \ visual studio 2010 \ Projects \ dcmimage \ Debug \ dcmimage.exe dcmimage
答案 0 :(得分:0)
我目前没有在我的机器上安装CMake,因此我无法自己试用。
看起来你需要构建各种库,这个看起来特别有趣:ofstd.lib
。然后还有oflog.lib
。
答案 1 :(得分:0)
请确保您将以下库链接到项目(项目属性 - &gt;链接器 - &gt;输入 - &gt;其他依赖项):
oflog.lib;ofstd.lib;iphlpapi.lib;ws2_32.lib;netapi32.lib;wsock32.lib