How to change path to DCMTK INCLUDE installation folder in every .h file
Moderator: Moderator Team
How to change path to DCMTK INCLUDE installation folder in every .h file
Is there any script or do I have to change the path of #include "..." in every header file by myself. Since, there are so many files and every file is connected to other header files, it becomes cumbersome to change the path manually.
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Suppose I've to include scu.h in dcmnet. I give path to include as the installed folder but scu.h itself include some other header files from dcmdata, which I am not including. And thus, error is generated as the include path in that .h file from dcmdata lib is not the correct path. That means I've to change include path in that .h file also and eventually, in all associated header files. Isn't it?
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
I think you might have something wrong in how things work. Every include in DCMTK is of the format, e.g. #include "dcmtk/dcmdata/dctk.h"
If you have installed DCMTK to a directory (by performing the steps mentioned some posts before), you have the following directory structure somewhere on your disk (e.g. c:\programs\DCMTK):
Within the include folder, you will have (besides others)
So, if you compile your own project, you add "c:\programs\DCMTK\include" to your compiler's include path, which is usually done by adding an option like -I"c:\programs\DCMTK\include".
This then permits you to use DCMTK in your own files like this:
#include "dcmtk/dcmdata/dctk.h" which is the same way DCMTK itself uses. Thus, your header file inclusions are correct and found by the compiler if you do it that way, and, the header file inclusions within DCMTK are automatically correct at the same time since they use exactly the same format. Is that clear?
Good luck,
Michael
I think you might have something wrong in how things work. Every include in DCMTK is of the format
Code: Select all
#include "dcmtk/$somelibrary/someheader.h"
If you have installed DCMTK to a directory (by performing the steps mentioned some posts before), you have the following directory structure somewhere on your disk (e.g. c:\programs\DCMTK):
Code: Select all
c:\programs\DCMTK\bin
c:\programs\DCMTK\etc
c:\programs\DCMTK\include
[...]
Code: Select all
c:\programs\DCMTK\include\dcmtk\dcmdata\dctk.h
c:\programs\DCMTK\include\dcmtk\ofstd\ofstring.h
c:\programs\DCMTK\include\dcmtk\config\osconfig.h
This then permits you to use DCMTK in your own files like this:
#include "dcmtk/dcmdata/dctk.h" which is the same way DCMTK itself uses. Thus, your header file inclusions are correct and found by the compiler if you do it that way, and, the header file inclusions within DCMTK are automatically correct at the same time since they use exactly the same format. Is that clear?
Good luck,
Michael
How to change path to of DCMTK Libraries from one system to other system
Hi Michael,
I did the same thing as you mentioned in your earlier posts. But i am facing different issue.
I installed on my local machine to D:\DICOM\DCMTK ..., then i want to change the entire solutions and respected files to different machine to other location such as E:\DCMTK . I copied the entire files and started building the solution from there onwards but i am getting lot of errors.
Can you tell me the simple way of changing this folder paths other than changing each solution and each file manually.
If manually also tries to change, where all places i need to change.
Thanks & regards,
Prakash
I did the same thing as you mentioned in your earlier posts. But i am facing different issue.
I installed on my local machine to D:\DICOM\DCMTK ..., then i want to change the entire solutions and respected files to different machine to other location such as E:\DCMTK . I copied the entire files and started building the solution from there onwards but i am getting lot of errors.
Can you tell me the simple way of changing this folder paths other than changing each solution and each file manually.
If manually also tries to change, where all places i need to change.
Thanks & regards,
Prakash
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest