Link errors with Visual Studio 7.0

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Ilan
Posts: 6
Joined: Mon, 2005-10-24, 14:03
Location: Haifa, Israel

Link errors with Visual Studio 7.0

#1 Post by Ilan »

I am trying to compile dcmtk-3.5.3 in order to use it in my application. First of all I had to change the file extensions in the project from *.cxx to *.cc, since the source files had the *.cc extension in the toolkit. This has been done.

I’m using Visual Studio 7.0 and I get the following error in many (but not all) applications:

Compiling...
findscu.cc
Linking...
LINK : fatal error LNK1117: syntax error in option ''

It’s command line (which I don’t know how to change) is:
/Od /I "../../config\include" /I "../../dcmnet\include" /I "../../ofstd\include" /I "../../dcmdata\include" /I "../../../zlib-1.2.1\include" /I "../../dcmtls\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_REENTRANT" /D "WITH_LIBPNG" /D "WITH_LIBTIFF" /D "WITH_ZLIB" /D "findscu_EXPORTS" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /EHsc /RTC1 /MTd /GS /YX"stdafx.h" /Fp".\Debug/findscu.pch" /Fo".\Debug/findscu1.obj" /Fd".\Debug/" /W3 /c /Z7
".\findscu.cc"

I just did a project Clean, just make sure I didn’t have junk in the way. I decided to concentrate on findscu.cc as the most important application, i.e. the one to query the Dicom server.

As can be seen from the above findscu.cc also suffers from this mysterious error LNK1117. I don’t see what option it is complaining about.

Can someone please point me in the right direction?
Thanks,
Ilan

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

The DCMTK source code distribution for the Windows platform uses the .cxx extension - there should be nothing to change. When compiling with VC7, make sure that you re-generate the project files from scratch using CMake as explained in the installation instructions, since an import of the VC6 project files will not work.

Alexander Fedotov
Posts: 53
Joined: Thu, 2005-04-14, 15:07
Location: St. Petersburg, Russia

Re: Link errors with Visual Studio 7.0

#3 Post by Alexander Fedotov »

> First of all I had to change the file extensions
> in the project from *.cxx to *.cc,

But you had not. Everything is compiled with *.cxx extention.

************
Compiling...
findscu.cc
Linking...
LINK : fatal error LNK1117: syntax error in option ''

It’s command line (which I don’t know how to change) is:
/Od /I "../../config\include" /I "../../dcmnet\include" /I "../../ofstd\include" /I "../../dcmdata\include" /I "../../../zlib-1.2.1\include" /I "../../dcmtls\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_REENTRANT" /D "WITH_LIBPNG" /D "WITH_LIBTIFF" /D "WITH_ZLIB" /D "findscu_EXPORTS" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /EHsc /RTC1 /MTd /GS /YX"stdafx.h" /Fp".\Debug/findscu.pch" /Fo".\Debug/findscu1.obj" /Fd".\Debug/" /W3 /c /Z7
".\findscu.cc"
****************

You have got a link error, but command line is from "C/C++" properties.
Look through "Linker" properties.
Then have a detailed look at "General/Output File, /Additonal Library Directories" etc.
You can change propeties and the command line will be changed automatically.
Try to understand the every option in a command line, make a "manual" parse of it.


Alexander.

Ilan
Posts: 6
Joined: Mon, 2005-10-24, 14:03
Location: Haifa, Israel

Thanks

#4 Post by Ilan »

Dear Marco,
I would just like to thank you for your most welcomed help in putting me on the right track. I failed to see the first time around the renaming of *.cc to *.cxx and I failed to see the fact that an automatic upgrade of Visual Studio 6.0 to 7.0 doesn’t work.
It was a real struggle with this mistake, but the experience I gained made it trivial the second time around.
I downloaded and used Cmake, so that the compilation went through with only 2 errors. Both errors involved include files where the file names were *.cc instead of the renamed *.cxx. These were trivial to fix.

I also downloaded and used doxygen to generate help, and then compiled help files. The only suggestion I can make here is you write specifically in your document to use htmldocs.cfg instead of the “make html” which is currently written. (I still don’t know what make html is supposed to do, but “doxygen htmldocs.cgf” works just great.)

So I’m finally at the point where I can try to incorporate some calls to your software and see what happens. The most interesting one from my point of view is dcmnet, so I’ll start with it.

Thanks again for your most crucial comment which got me out of the mud.
Thanks,
Ilan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest