Code: Select all
// TestLibrary.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dctk.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
DcmFileFormat fileformat;
const DcmTagKey DCM_PatientsName;
OFCondition status = fileformat.loadFile("test.dcm");
if (status.good())
{
OFString patientsName;
if (fileformat.getDataset()->findAndGetOFString(DCM_PatientsName, patientsName).good())
{
cout << "Patient's Name: " << patientsName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cout << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
return 0;
return 0;
}
Code: Select all
>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>dcmdata.lib(vrscan.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcbytstr.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z) referenced in function "void __cdecl normalizeString(class OFString &,bool,bool,bool,char)" (?normalizeString@@YAXAAVOFString@@_N11D@Z)
1>dcmdata.lib(dcchrstr.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcpixseq.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcspchrs.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcpxitem.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcdirrec.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcdict.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
1>dcmdata.lib(dcvrui.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall dcmtk::log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@dcmtk@@QBE_NH@Z)
....
1>TestLibrary - 43 error(s), 0 warning(s)