Not able to compile - link error lnk2001

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nedunuri
Posts: 9
Joined: Thu, 2005-03-10, 20:27

Not able to compile - link error lnk2001

#1 Post by nedunuri »

I am trying to create a test application which would work similar to dcmcjpeg and dcmdjpeg. But the compilation failes with linking error Lnk2001. I added the following libraries for search.
dcmdatad.lib ofstdd.lib dcmjpegd.lib zlibd.lib ijg8d.lib ijg12d.lib ijg16d.lib

Here are the errors I got. Please help me in to fix this problem.

Compiling...
DcmCompress.cpp
Linking...
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall DicomImage::~DicomImage(void)" (??1DicomImage@@UAE@XZ)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: class DicomImage * __thiscall DicomImage::createMonochromeImage(double,double,double)const " (?createMonochromeImage@DicomImage@@QBEPAV1@NNN@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: __thiscall DicomImage::DicomImage(class DcmObject *,enum E_TransferSyntax,unsigned long,unsigned long,unsigned long)" (??0DicomImage@@QAE@PAVDcmObject@@W4E_TransferSynta
x@@KKK@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::getMinMaxValues(double &,double &,int)const " (?getMinMaxValues@DiMonoImage@@QBEHAAN0H@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setNoVoiTransformation(void)" (?setNoVoiTransformation@DiMonoImage@@QAEHXZ)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setMinMaxWindow(int)" (?setMinMaxWindow@DiMonoImage@@QAEHH@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setHistogramWindow(double)" (?setHistogramWindow@DiMonoImage@@QAEHN@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setRoiWindow(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long)" (?setRoiWindow@DiMonoImage@@QAEHKKKKK@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setWindow(unsigned long)" (?setWindow@DiMonoImage@@QAEHK@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setWindow(double,double,char const *)" (?setWindow@DiMonoImage@@QAEHNNPBD@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setVoiLut(unsigned long)" (?setVoiLut@DiMonoImage@@QAEHK@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiMonoImage::setPresentationLutShape(enum ES_PresentationLut)" (?setPresentationLutShape@DiMonoImage@@QAEHW4ES_PresentationLut@@@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DiOverlay::hideAllPlanes(void)" (?hideAllPlanes@DiOverlay@@QAEHXZ)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: unsigned int __thiscall DiOverlay::getPlaneGroupNumber(unsigned int)const " (?getPlaneGroupNumber@DiOverlay@@QBEII@Z)
dcmjpegd.lib(djcodece.obj) : error LNK2001: unresolved external symbol "public: unsigned long __thiscall DiMonoImage::create6xxx3000OverlayData(unsigned char * &,unsigned int,unsigned int &,unsigned int &,unsigned long &,unsigned int)" (?create6xxx3
000OverlayData@DiMonoImage@@QAEKAAPAEIAAI1AAKI@Z)
Debug/DcmCompress.exe : fatal error LNK1120: 15 unresolved externals
Error executing link.exe.
Thanks and Regards
Ravi Kumar

nedunuri
Posts: 9
Joined: Thu, 2005-03-10, 20:27

#2 Post by nedunuri »

I found the problem. I missed to include library dcmimgle.lib. Now I am able to compile the application.
Sorry for the trouble.
Thanks and Regards
Ravi Kumar

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#3 Post by Jörg Riesmeier »

See also FAQ #27.

Silvermaul
Posts: 31
Joined: Thu, 2010-09-02, 10:03

#4 Post by Silvermaul »

There is an error in the picture displayed here :

http://support.dcmtk.org/wiki/_media/dc ... encies.png

dcmsign does not exist. What exists is dcmdsig. Is this the normal correction?

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#5 Post by Jörg Riesmeier »

Thank you for the comment. However, the name of the module is still "dcmsign" :-)

Silvermaul
Posts: 31
Joined: Thu, 2010-09-02, 10:03

#6 Post by Silvermaul »

No problem :)

I was just trying to figure out why I have linker error and I thought that may be it but I am still unable to solve my problem. At least something good came out ;)

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#7 Post by Jörg Riesmeier »

The library has been renamed back in 2003 from "dcmsign" to "dcmdsig" ...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest