Building dcmtk using Windows command line

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
cscooper
Posts: 6
Joined: Tue, 2014-02-25, 10:55

Building dcmtk using Windows command line

#1 Post by cscooper »

I need to build dcmtk under Windows 7 from an automated build server, and I've got it mostly working but the final step (the "make install") seems to require the intervention of a human to run Visual Studio and right-click on a button.

I've tried various combinations of msbuild DCMTK.sln /t:INSTALL but it always gives me an error that "The project "INSTALL" is not selected for building in solution configuration". "nmake install" doesn't do me any good either.

Any ideas on doing this step without manual intervention?

Thanks,
Chris

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

Re: Building dcmtk using Windows command line

#2 Post by Michael Onken »

Hi,

I could not try yet, but did you try the to use the target name in capital letters, i.e. nmake INSTALL, since it is written in capitals within Visual Studio? According the Microsoft nmake documentation, one can give the desired target on the commandline so it should(...) work ;)

Best,
Michael

cscooper
Posts: 6
Joined: Tue, 2014-02-25, 10:55

Re: Building dcmtk using Windows command line

#3 Post by cscooper »

No luck there either ...

From my "build" directory (which is where I call cmake from, to keep source files and build products separate), if I execute "nmake INSTALL" it says "don't know how to make 'INSTALL'". If I execute the same command from the source folder, it says "file config/Makefile.def not found" and it's correct (no makefile.def exists anywhere).

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

Re: Building dcmtk using Windows command line

#4 Post by Michael Onken »

Hi,

I tried building with NMake on my system (Windows 7, VS 2012, 32 Bit Build). I used CMake (2.8.12.2) to configure the source, and selected "NMake Makefiles" as code generator. Then I set Visual Studio variables by calling the corresponding vcvarsall.bat script that comes with Visual Studio.

I was then able to build the source using "make" (log) from the CMake build directory. In the same directory I ran "make install" (log) in order to perform the installation. Both work worked for me.

In order to be sure that this is not a thing that was fixed in DCMTK code earlier, please use current DCMTK code. I used latest DCMTK code from git . You can also use the current snapshot.

Hope that helps,
Michael

cscooper
Posts: 6
Joined: Tue, 2014-02-25, 10:55

Re: Building dcmtk using Windows command line

#5 Post by cscooper »

That definitely helps - so at this point the answer seems to be that you can't do the install if you've done
cmake -G "Visual Studio 10 Win64"
msbuild DCMTK.sln
you have to do
cmake -G "NMake Makefiles"
nmake
nmake install

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

Re: Building dcmtk using Windows command line

#6 Post by Michael Onken »

Exactly, this is what I have done at least ;)

Best,
Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest