Error: DCMTK needs stringstream or strstream type
Moderator: Moderator Team
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
Error: DCMTK needs stringstream or strstream type
Hi,
I am trying to compile my own program, which uses dcmtk, on Windows7 .
I got the following error message and I do not understand what it means:
"/\include\dcmtk\ofstd\ofstream.h(80): fatal error C1189: #error : DCMTK needs stringstream or strstream type"
I compile the DCMTK first, I built the dcmtk libraries following the instructions in INSTALL file.
I include "osconfig.h" as the first line of my source and header files.
My compiler version is Visual Studio 2010
I would appreciate any help to solve this problem...
I am trying to compile my own program, which uses dcmtk, on Windows7 .
I got the following error message and I do not understand what it means:
"/\include\dcmtk\ofstd\ofstream.h(80): fatal error C1189: #error : DCMTK needs stringstream or strstream type"
I compile the DCMTK first, I built the dcmtk libraries following the instructions in INSTALL file.
I include "osconfig.h" as the first line of my source and header files.
My compiler version is Visual Studio 2010
I would appreciate any help to solve this problem...
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
Yes,the version is 3.6.0.Jörg Riesmeier wrote:Which version of the DCMTK are you using? The current version 3.6.0?
Have you already checked the corresponding source code line in "ofstd/include/dcmtk/ofstd/ofstream.h"? Are the relevant defines in "osconfig.h" really undefined?
In my view,there may be somthing wrong in the new DCMTK version 3.6.0,
especially the ofstream.h,Because when I compile the dcmtk with cmake there was something note was appeared . eg, some flie of ".h"was not found,but when I generated and compile the ".dsw" ,it was successed?
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Are you sure that you've selected the correct Compiler in CMake? I'm asking this because for VisualStudio 2010 CMake usually creates ".sln" files instead of ".dsw" (and ".dsp").
So, does that mean that DCMTK compiles without any problems?Because when I compile the dcmtk with cmake there was something note was appeared . eg, some flie of ".h"was not found,but when I generated and compile the ".dsw" ,it was successed?
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
Yes ,you are right ,it is really "sln".Jörg Riesmeier wrote:Are you sure that you've selected the correct Compiler in CMake? I'm asking this because for VisualStudio 2010 CMake usually creates ".sln" files instead of ".dsw" (and ".dsp").
So, does that mean that DCMTK compiles without any problems?Because when I compile the dcmtk with cmake there was something note was appeared . eg, some flie of ".h"was not found,but when I generated and compile the ".dsw" ,it was successed?
It is some details when I cmake
Looking for strtoul - found
Looking for sysinfo
Looking for sysinfo - not found
Looking for tempnam
Looking for tempnam - found
Looking for tmpnam
Looking for tmpnam - found
Looking for uname
Looking for uname - not found
Looking for usleep
Looking for usleep - not found
Looking for waitpid
Looking for waitpid - not found
Looking for _findfirst
Looking for _findfirst - found
Looking for isinf
Looking for isinf - not found.
Looking for isnan
Looking for isnan - not found.
Looking for finite
Looking for finite - not found.
Looking for flock
Looking for flock - not found.
Looking for gethostbyname
Looking for gethostbyname - found
Looking for gethostid
Looking for gethostid - not found.
Looking for bzero
Looking for bzero - not found.
Looking for gethostname
Looking for gethostname - found
Looking for waitpid
Looking for waitpid - not found.
Looking for wait3
Looking for wait3 - not found.
Looking for usleep
Looking for usleep - not found.
Looking for accept
Looking for accept - found
Looking for bind
Looking for bind - found
Looking for getsockname
Looking for getsockname - found
Looking for getsockopt
Looking for getsockopt - found
Looking for setsockopt
Looking for setsockopt - found
Looking for socket
Looking for socket - found
Looking for listen
Looking for listen - found
Looking for std::vfprintf
Looking for std::vfprintf - found
Looking for std::vsnprintf
Looking for std::vsnprintf - not found.
It's the part of . and it's really vs2010.
thanks!!
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
May be some head files is wrong ,when compiling the dcmtk,the problem wasn't appeared,but use it to do some work ,the wrong appred, isn't it?Jörg Riesmeier wrote:I'm sorry but where exactly is the problem when DCMTK compiles without problems? CMake is only used to create the project files for VisualStudio. If the configure/generate process is completed, CMake is not needed any more.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
If the DCMTK compiles out-of-the-box (which should be the normal case on your platform), then there was apparently no problem with the CMake configuration (of DCMTK).
If you experience problems when creating your own application, then the reason is probably in your application / your CMake files. FAQ #47 explains how to use DCMTK in your own application (with CMake).
If you experience problems when creating your own application, then the reason is probably in your application / your CMake files. FAQ #47 explains how to use DCMTK in your own application (with CMake).
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
oh,I am so appreciate for your help ! You do a lot for me to understand the dcmtk! And I think the dcmtk is not a easy problem!Jörg Riesmeier wrote:If the DCMTK compiles out-of-the-box (which should be the normal case on your platform), then there was apparently no problem with the CMake configuration (of DCMTK).
If you experience problems when creating your own application, then the reason is probably in your application / your CMake files. FAQ #47 explains how to use DCMTK in your own application (with CMake).
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
I want to tell you that my mother language wasn't English,So some meaning wasn't express well.
The first question was that "osconfig.h" was defferent after Cmake,so you should use the cmaked "osconfig.h"
And I want to ask you another question ,Whether PNG TIFF ZLIB and Openssl were must be ,when I Cmake ,I didn't set those value on.
The first question was that "osconfig.h" was defferent after Cmake,so you should use the cmaked "osconfig.h"
And I want to ask you another question ,Whether PNG TIFF ZLIB and Openssl were must be ,when I Cmake ,I didn't set those value on.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
The "osconfig.h" that is used by DCMTK (and which should be used by your application) is created in the "include/dcmtk/config" directory - in the build directory, not in the source directory!The first question was that "osconfig.h" was defferent after Cmake,so you should use the cmaked "osconfig.h"
As you can read in the INSTALL file, these external libraries are optional, i.e. you don't need them necessarily. You can find pre-compiled support libraries for Windows on the DCMTK homepage. If they are not found in the specified path (or the path is not specified at all), then these libraries are disabled automatically.Whether PNG TIFF ZLIB and Openssl were must be ,when I Cmake ,I didn't set those value on.
-
- Posts: 29
- Joined: Mon, 2010-08-16, 10:01
- Location: CHINA
Who is online
Users browsing this forum: No registered users and 1 guest