CMake error with DCMTK 3.6.0 for Visual C++ 6.0

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

CMake error with DCMTK 3.6.0 for Visual C++ 6.0

#1 Post by srhdavidson »

Hello,

I downloaded DCMTK 3.6.0 and used CMake 2.8.4 to configure and generate a workspace for Visual C++ 6.0 (with SP6).

CMake generated the following error:

Code: Select all

CMake Error: Unable to find the executable at any of:
  D:/Program Files/dcmtk-3.6.0/CMakeTmp/Char/CMakeFiles/CMakeTmp/cmTryCompileExec.exe
  D:/Program Files/dcmtk-3.6.0/CMakeTmp/Char/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe
  D:/Program Files/dcmtk-3.6.0/CMakeTmp/Char/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe
but generated a workspace nonetheless. However, when I tried building the ALL_BUILD (Debug) configuration, the process got as far as dcm2pdf, where the build stopped with the following error:

Code: Select all

LINK : fatal error LNK1104: cannot open file "D:\Program Files\dcmtk-3.6.0\oflog\libsrc\Debug\oflog.lib"
Any suggestions to get a successful build?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

this sounds very weird. Did you try to re-install CMake (maybe some access rights are wrong) or do you use the same CMake installation successfully with another project?

Just in case this is your first CMake project, you could refer to our CMake-DCMTK tutorial.

Best regards,
Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#3 Post by srhdavidson »

Michael,

I have successfully used earlier versions of CMake to build earlier versions of DCMTK (3.5.4, in particular) as well as other projects (VTK). The error I cited occurred when I tried building DCMTK 3.6.0 with CMake 2.8.0. I then installed CMake 2.8.4, cleared the CMake cache and tried again and still ended up with the same error. I have admin rights to the computer that I am using so I don't think access rights is the issue.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

Hi,

thanks for the details. In case you haven't done, be sure to try with a completely new build directory, not only cleaning the CMakeCache via GUI.

Ahh, and since you are using VC6: Did you rename the .cc file extensions to cxx as needed for VC6 (still with SP6?)? There is a little helper script called changext in the config directory which can be used for that. However, it only runs on unix (or maybe cygwin).

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#5 Post by srhdavidson »

Michael,

Since my last post, I un-installed and re-installed CMake and I also tried a different build directory. Neither attempt solved the CMake error. The executable that CMake cannot find no longer appears to be a part of the CMake distribution. I think it was part of an earlier distribution(2.4 or 2.6?). I have had previous versions of CMake installed and maybe this is leading to some confusion in the configuration process? I'm making wild guesses at this point.

I will try your suggestion for replacing the file extensions but I want to make sure that I get the order correct. Please confirm if this is correct:

1) Replace the .cc extensions of *all* DCMTK 3.6.0 source code files with .cxx (or get that script to run).
2) Re-build the VC6 workspace with CMake.
3) Build DCMTK.

Sean

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#6 Post by Michael Onken »

Hi,

this is correct. However, you have also to change the content of some files since they refer inside to .cc files. You can see in the quoted script which these are (at least some of DCMTK's CMake files and I think something in dcmimage but not sure).

If you do not get it running, tell me and I prepare a 3.6.0 package for VC6 with all renaming done with the script.

Michael

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#7 Post by J. Riesmeier »


Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#8 Post by Michael Onken »

Ah, that method is new to me :-)

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#9 Post by srhdavidson »

Success!

I used Michael's approach. I was able to successfully run the changext script through cygwin (for others who may have this problem, please note that the script takes several minutes to run). That solved the CMake error and led to a successful build of the DCMTK 3.6.0 library. I was able to get my own program to compile, so now on to some actual programming!

Thank you for leading me to a solution.

Sean

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#10 Post by Michael Onken »

Fine! I have also added a short note about that to our CMake compilation howto within the wiki.

Enjoy 3.6.0 :)

Michael

zhouling
Posts: 2
Joined: Mon, 2011-05-23, 11:11
Location: CHINA

#11 Post by zhouling »

hello ,i have followed the steps,i still have the same mistakes .can you give me some help?
(i use vc++6.0 and cmake 2.8.4.I have changed .cc to .cxx for dcmtk 3.6.0 source code. :( )


D:/Program Files/dcmtk3.6.0/bulid/CMakeTmp/Char/CMakeFiles/CMakeTmp/cmTryCompileExec.exe
D:/Program Files/dcmtk3.6.0/bulid/CMakeTmp/Char/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe
D:/Program Files/dcmtk3.6.0/bulid/CMakeTmp/Char/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#12 Post by Michael Onken »

Hi,

everything should have been said in this thread. As part of the CMake DCMTK howto, I also added this special page about the issue. Please re-check whether you have done all the steps mentioned.

If this does not help, what is exactly the error you get?

Michael

zhouling
Posts: 2
Joined: Mon, 2011-05-23, 11:11
Location: CHINA

#13 Post by zhouling »

:D
Michael,
I have done it successfully.I reinstall everything,both vc++ and cmake.thank you very much for your help! :P :P

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest