A LNK2001 error thrown during the linking process

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
liuxinming
Posts: 83
Joined: Thu, 2009-03-19, 04:19

A LNK2001 error thrown during the linking process

#1 Post by liuxinming »

I' ve been debugging a test application to test whether the dcmtk has been installed on my system appropriately. I used the MFC standard library "in a dynamic share dll" which was set in the project->setting window.

I believe that the included files and library files are in the right places where they should be. The include files and library files are in the folders which I' ve created in order to apply them to my project.

After I' ve deleted this including sentence #include "dcmtk/dcmimage/diregist.h", the error disappeared. So I thought that the lib file associated with the header might not work.

I' m not sure whether the issue has been described clearly. Could anyone give me some advice, please?

The error messages here:

Compiling...
testView.cpp
Linking...
testView.obj : error LNK2001: unresolved external symbol "public: __thiscall DiRegister::DiRegister(void)" (??0DiRegister@@QAE@XZ)
testView.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall DiRegister::~DiRegister(void)" (??1DiRegister@@UAE@XZ)
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

test.exe - 3 error(s), 0 warning(s)

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

#2 Post by Jörg Riesmeier »

If you include "diregist.h" you also need to link the dcmimage library to your application (which contains the support for color images).

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests