compiling error

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
starch
Posts: 2
Joined: Mon, 2006-04-10, 18:05

compiling error

#1 Post by starch »

hi all,

I'm using dcmtk under linux, my gcc version is 3.4.5. I got the following errors when I tried to build my program, can anyone tell me why? Thanks a lot!

In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:40,
from source.cxx:2:
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:118: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:121: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:124: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:135: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:138: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:141: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:144: error: `size_t' does not name a type
/usr/local/dicom/include/dcmtk/dcmdata/dctypes.h:147: error: `size_t' does not name a type
In file included from /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3/backward/iostream.h:31,
from /usr/local/dicom/include/dcmtk/ofstd/ofstream.h:63,
from /usr/local/dicom/include/dcmtk/ofstd/ofstring.h:63,
from /usr/local/dicom/include/dcmtk/ofstd/ofcond.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dcerror.h:38,
from /usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:41,
from source.cxx:2:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/local/dicom/include/dcmtk/ofstd/ofstring.h:63,
from /usr/local/dicom/include/dcmtk/ofstd/ofcond.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dcerror.h:38,
from /usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:41,
from source.cxx:2:
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:76:2: #error DCMTK needs stringstream or strstream type
In file included from /usr/local/dicom/include/dcmtk/ofstd/ofstring.h:63,
from /usr/local/dicom/include/dcmtk/ofstd/ofcond.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dcerror.h:38,
from /usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:39,
from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:41,
from source.cxx:2:
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:102: error: `strstream' does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:103: error: `ostrstream' does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:104: error: `istrstream' does not name a type
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:38,
from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:54,
from source.cxx:2:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:58:2: #error Your C++ compiler cannot handle class templates:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:498:2: #error Your C++ Compiler is not capable of compiling this code
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:55,
from source .cxx:2:
/usr/local/dicom/include/dcmtk/dcmdata/dcdict.h:54:2: #error "DCM_DICT_DEFAULT_PATH is not defined via osconfig.h"

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

You probably forgot to define HAVE_CONFIG_H and/or to include "dcmtk/config/osconfig.h" as the first header file in your sources.

starch
Posts: 2
Joined: Mon, 2006-04-10, 18:05

#3 Post by starch »

Yes, actually, I just fixed the problem in this way. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest