Where are the .h files present in the build folder?

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

Where are the .h files present in the build folder?

#1 Post by ahirnish »

I built the binaries using Cmake but I am unable to find where are the .h files are present in the folder. For ex. i'm unable to find ofconfig.h in config folder in the build folder. Did I do something wrong while building the binaries?
When I tried to include the osconfig.h in my separate project, it says that there is no such file or directory.

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

#2 Post by Michael Onken »

Hi,

after installing DCMTK, osconfig.h is in the include/dcmtk/config folder, i.e. the include must be (as you can see in 99% of all source code files in DCMTK and all published examples):

Code: Select all

#include "dcmtk/config/osconfig.h" 
That means that you add to your compiler as the include "$YOUR_DCMTK_INSTALLATION_PATH/include".

Best regards,
Michael

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#3 Post by ahirnish »

Ok. I got where you told me to find the .h file.
But I'm having some basic confusions.
1. Do I have to include Cmakelist.txt in my every separate project?
2. Do I have to make changes according to the path of the .h file, as you said, in Cmakelist.txt also or only in the .cpp file?
3. I also have to include dcmnet library in my project. What should I do? There is also an include folder in the dcmnet folder but there are no .h or .lib files present in there?

Please help me.
Thank you in advance.

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#4 Post by ahirnish »

how to include these files. I am also unable to locate them. Please help me
:(

Code: Select all

#include "dcmtk/ofstd/ofconapp.h"
#include "dcmtk/ofstd/ofstring.h"
#include "dcmtk/ofstd/ofstream.h"
#include "dcmtk/dcmnet/dicom.h"      /* for DICOM_APPLICATION_REQUESTOR */
#include "dcmtk/dcmnet/dimse.h"
#include "dcmtk/dcmnet/diutil.h"
#include "dcmtk/dcmnet/dcasccfg.h"   /* for class DcmAssociationConfiguration */
#include "dcmtk/dcmnet/dcasccff.h"   /* for class DcmAssociationConfigurationFile */
#include "dcmtk/dcmdata/dcdatset.h"
#include "dcmtk/dcmdata/dcmetinf.h"
#include "dcmtk/dcmdata/dcfilefo.h"
#include "dcmtk/dcmdata/dcuid.h"
#include "dcmtk/dcmdata/dcdict.h"
#include "dcmtk/dcmdata/dcdeftag.h"
#include "dcmtk/dcmdata/cmdlnarg.h"
#include "dcmtk/dcmdata/dcuid.h"     /* for dcmtk version name */
#include "dcmtk/dcmdata/dcostrmz.h"  /* for dcmZlibCompressionLevel */

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

#5 Post by Michael Onken »

Hi,

first of all, compile and install(!) DCMTK. Here you can find advice how to do it. If you are using Visual Studio, make sure that after compiling, you also must run the project "INSTALL" within Visual Studio. This will copy all files into the necessary directory structure, usually something like "C:\Program Files\DCMTK" or the like.

After that, for your own project, only set the include path to your DCMTK installation directory's include folder, e.g. "C:\Program Files\DCMTK\include". You then can reference any header file you talked about just the way you did. Here is help how to use DCMTK in your own project with CMake (little outdated text, maybe).

Note that the described steps are pretty normal for nearly any kind of software project, it is nothing special for DCMTK.

HTH,
Michael

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#6 Post by ahirnish »

4.) Select target INSTALL in order to install the DCMTK files to the directory specified using CMake. .

You said that I have to run the INSTALL project in MSVC. Is 'running'='building' here? The link that you posted has that #4 step. I am not understanding the implication of CMAKE here. How to install using Cmake?

Also, I have deleted the subproject dcm2pdf. Does it affect the process afterwards because I dont need that library?

Thanks for the help

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#7 Post by ahirnish »

This is the error I got when I build INSTALL. What should I do?

Code: Select all

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
2>  Build all projects
3>------ Build started: Project: INSTALL, Configuration: Debug Win32 ------
3>  -- Install configuration: "Debug"
3>  CMake Error at cmake_install.cmake:31 (FILE):
3>    file cannot create directory: C:/Program Files/DCMTK/include/dcmtk/config.
3>    Maybe need administrative privileges.
3>  
3>  
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "setlocal
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: "C:\Program Files\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmErrorLevel
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: exit /b %1
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmDone
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.
========== Build: 2 succeeded, 1 failed, 75 up-to-date, 0 skipped ==========

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#8 Post by ahirnish »

So, after running MSVC in Administrator mode, building INSTALL make the folder required in C:/Program Files but still got an error, which is probably because I deleted that dcm2pdf. Will it pose any problem bacause I dont need that library?

Code: Select all

Make Error at dcmdata/apps/cmake_install.cmake:32 (FILE):
3>    file INSTALL cannot find
3>    "C:/src1/BUILD/BUILD-3.6.0/dcmdata/apps/Debug/dcm2pdf.exe".
3>  Call Stack (most recent call first):
3>    dcmdata/cmake_install.cmake:34 (INCLUDE)
3>    cmake_install.cmake:50 (INCLUDE)
3>  
3>  
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "setlocal
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: "C:\Program Files\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmErrorLevel
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: exit /b %1
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmDone
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.
========== Build: 2 succeeded, 1 failed, 75 up-to-date, 0 skipped ==========

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

#9 Post by Michael Onken »

Hi,

you don't need dcm2pdf.exe.

Best,
Michael

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#10 Post by ahirnish »

Thanks. But when I opened C:/Program Files/DCMTK/include, I found only 3 folders viz, config, ofstd and oflog with their header files. There are no other folders of other subprojects, for ex. dcmnet, dcmtls or dcmimeg.
Does running INSTALL generate only these 3 folders (i mean, what I did was right) or other folders as well?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest