I've got a problem. I'm want to develop a program using the DCMTK on a Fedora Core 9 platform (linux) using the Eclipse IDE (Version 3.4.1).
When I try to import one of the dcmtk apps in my Eclipse (f.e. I used dcmdump) and try to compile it, I get a lot of compiler/linker errors and I don't know what to do about them.
(btw, i don't have much experience with C++, so please don't blame me if this is an easy or stupid question or something)
Code: Select all
**** Build of configuration Debug for project dcmtkDumper ****
make all
Building file: ../dcmdump.cc
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"dcmdump.d" -MT"dcmdump.d" -o"dcmdump.o" "../dcmdump.cc"
In file included from ../dcmdump.cc:34:
/usr/include/dcmtk/ofstd/ofstream.h:76:2: error: #error DCMTK needs stringstream or strstream type
In file included from /usr/include/dcmtk/dcmdata/dchashdi.h:38,
from /usr/include/dcmtk/dcmdata/dctk.h:54,
from ../dcmdump.cc:35:
/usr/include/dcmtk/ofstd/oflist.h:58:2: error: #error Your C++ compiler cannot handle class templates:
/usr/include/dcmtk/ofstd/oflist.h:498:2: error: #error Your C++ Compiler is not capable of compiling this code
In file included from /usr/include/dcmtk/dcmdata/dctk.h:55,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcdict.h:54:2: error: #error "DCM_DICT_DEFAULT_PATH is not defined via osconfig.h"
In file included from ../dcmdump.cc:34:
/usr/include/dcmtk/ofstd/ofstream.h:102: error: ‘strstream’ does not name a type
/usr/include/dcmtk/ofstd/ofstream.h:103: error: ‘ostrstream’ does not name a type
/usr/include/dcmtk/ofstd/ofstream.h:104: error: ‘istrstream’ does not name a type
In file included from /usr/include/dcmtk/dcmdata/dctk.h:40,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dctypes.h:118: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:121: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:124: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:135: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:138: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:141: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:144: error: ‘size_t’ does not name a type
/usr/include/dcmtk/dcmdata/dctypes.h:147: error: ‘size_t’ does not name a type
In file included from /usr/include/dcmtk/ofstd/ofcond.h:39,
from /usr/include/dcmtk/dcmdata/dcerror.h:38,
from /usr/include/dcmtk/dcmdata/dcswap.h:39,
from /usr/include/dcmtk/dcmdata/dctk.h:41,
from ../dcmdump.cc:35:
/usr/include/dcmtk/ofstd/ofstring.h:78: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:108: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:108: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:118: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:131: error: expected `)' before ‘rep’
/usr/include/dcmtk/ofstd/ofstring.h:182: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:182: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:189: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:202: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:213: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:213: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:220: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:233: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:245: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:255: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:263: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:272: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:279: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:296: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:307: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:316: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:326: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:334: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:346: error: expected `;' before ‘char’
/usr/include/dcmtk/ofstd/ofstring.h:346: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:357: error: expected `;' before ‘char’
/usr/include/dcmtk/ofstd/ofstring.h:357: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:373: error: declaration of ‘operator[]’ as non-function
/usr/include/dcmtk/ofstd/ofstring.h:373: error: expected ‘;’ before ‘(’ token
/usr/include/dcmtk/ofstd/ofstring.h:384: error: expected `;' before ‘const’
/usr/include/dcmtk/ofstd/ofstring.h:402: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:411: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:429: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:434: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:442: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:462: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:474: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:481: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:481: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:508: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:508: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:519: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:519: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:520: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:520: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:537: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:537: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:538: error: ‘size_t’ has not been declared
/usr/include/dcmtk/ofstd/ofstring.h:549: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:561: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:572: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:583: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:594: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:606: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:617: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:628: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:639: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:651: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:662: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:673: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:683: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:694: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:704: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:714: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:724: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:735: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:745: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:755: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:766: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:778: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:789: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:800: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:807: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/ofstring.h:108: error: ‘OFString_npos’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h:182: error: ‘OFString_npos’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h:213: error: ‘OFString_npos’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h:481: error: ‘OFString_npos’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h:538: error: ‘OFString_npos’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h: In member function ‘char OFString::operator[](int) const’:
/usr/include/dcmtk/ofstd/ofstring.h:359: error: ‘const class OFString’ has no member named ‘size’
/usr/include/dcmtk/ofstd/ofstring.h:362: error: ‘const class OFString’ has no member named ‘size’
/usr/include/dcmtk/ofstd/ofstring.h:362: error: ‘assert’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofstring.h: In member function ‘OFBool OFString::empty() const’:
/usr/include/dcmtk/ofstd/ofstring.h:421: error: ‘const class OFString’ has no member named ‘size’
/usr/include/dcmtk/ofstd/ofstring.h: In member function ‘void OFString::clear()’:
/usr/include/dcmtk/ofstd/ofstring.h:451: error: ‘class OFString’ has no member named ‘erase’
/usr/include/dcmtk/ofstd/ofstring.h: At global scope:
/usr/include/dcmtk/ofstd/ofstring.h:817: error: expected constructor, destructor, or type conversion before ‘&’ token
/usr/include/dcmtk/ofstd/ofstring.h:825: error: expected constructor, destructor, or type conversion before ‘&’ token
In file included from /usr/include/dcmtk/dcmdata/dcerror.h:38,
from /usr/include/dcmtk/dcmdata/dcswap.h:39,
from /usr/include/dcmtk/dcmdata/dctk.h:41,
from ../dcmdump.cc:35:
/usr/include/dcmtk/ofstd/ofcond.h: In constructor ‘OFCondition::OFCondition(OFConditionString*)’:
/usr/include/dcmtk/ofstd/ofcond.h:321: error: ‘assert’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofcond.h: In constructor ‘OFCondition::OFCondition(const OFConditionConst&)’:
/usr/include/dcmtk/ofstd/ofcond.h:337: error: ‘assert’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofcond.h: In copy constructor ‘OFCondition::OFCondition(const OFCondition&)’:
/usr/include/dcmtk/ofstd/ofcond.h:344: error: ‘assert’ was not declared in this scope
/usr/include/dcmtk/ofstd/ofcond.h: In member function ‘OFCondition& OFCondition::operator=(const OFCondition&)’:
/usr/include/dcmtk/ofstd/ofcond.h:366: error: ‘assert’ was not declared in this scope
In file included from /usr/include/dcmtk/dcmdata/dcxfer.h:40,
from /usr/include/dcmtk/dcmdata/dcswap.h:40,
from /usr/include/dcmtk/dcmdata/dctk.h:41,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcvr.h: At global scope:
/usr/include/dcmtk/dcmdata/dcvr.h:210: error: ‘size_t’ does not name a type
In file included from /usr/include/dcmtk/dcmdata/dctk.h:41,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcswap.h:51: error: expected ‘,’ or ‘...’ before ‘valWidth’
/usr/include/dcmtk/dcmdata/dcswap.h:55: error: expected ‘,’ or ‘...’ before ‘valWidth’
In file included from /usr/include/dcmtk/dcmdata/dctk.h:46,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcuid.h:138: error: ‘NULL’ was not declared in this scope
In file included from /usr/include/dcmtk/dcmdata/dctk.h:51,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dctagkey.h:88: error: ‘ostream’ is neither function nor member function; cannot be declared friend
/usr/include/dcmtk/dcmdata/dctagkey.h:88: error: expected ‘;’ before ‘&’ token
/usr/include/dcmtk/dcmdata/dctagkey.h:104: error: expected constructor, destructor, or type conversion before ‘&’ token
In file included from /usr/include/dcmtk/dcmdata/dctk.h:53,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcdicent.h:370: error: ‘ostream’ is neither function nor member function; cannot be declared friend
/usr/include/dcmtk/dcmdata/dcdicent.h:370: error: expected ‘;’ before ‘&’ token
/usr/include/dcmtk/dcmdata/dcdicent.h: In member function ‘int DcmDictEntry::privateCreatorMatch(const char*) const’:
/usr/include/dcmtk/dcmdata/dcdicent.h:154: error: ‘NULL’ was not declared in this scope
/usr/include/dcmtk/dcmdata/dcdicent.h:155: error: ‘strcmp’ was not declared in this scope
/usr/include/dcmtk/dcmdata/dcdicent.h: In member function ‘int DcmDictEntry::contains(const char*) const’:
/usr/include/dcmtk/dcmdata/dcdicent.h:333: error: ‘strcmp’ was not declared in this scope
In file included from /usr/include/dcmtk/dcmdata/dchashdi.h:38,
from /usr/include/dcmtk/dcmdata/dctk.h:54,
from ../dcmdump.cc:35:
/usr/include/dcmtk/ofstd/oflist.h: In constructor ‘OFListLinkBase::OFListLinkBase()’:
/usr/include/dcmtk/ofstd/oflist.h:109: error: ‘NULL’ was not declared in this scope
/usr/include/dcmtk/ofstd/oflist.h: At global scope:
/usr/include/dcmtk/ofstd/oflist.h:125: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/oflist.h:133: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/oflist.h: In constructor ‘OFIterator<T>::OFIterator()’:
/usr/include/dcmtk/ofstd/oflist.h:192: error: ‘NULL’ was not declared in this scope
/usr/include/dcmtk/ofstd/oflist.h: In member function ‘T& OFIterator<T>::operator*() const’:
/usr/include/dcmtk/ofstd/oflist.h:226: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available
/usr/include/dcmtk/ofstd/oflist.h:226: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/dcmtk/ofstd/oflist.h: At global scope:
/usr/include/dcmtk/ofstd/oflist.h:352: error: ‘size_t’ does not name a type
/usr/include/dcmtk/ofstd/oflist.h:395: error: ‘size_t’ has not been declared
In file included from /usr/include/dcmtk/dcmdata/dctk.h:54,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDictIterator::DcmHashDictIterator()’:
/usr/include/dcmtk/dcmdata/dchashdi.h:138: error: ‘NULL’ was not declared in this scope
/usr/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDictIterator::DcmHashDictIterator(const DcmHashDict*, OFBool)’:
/usr/include/dcmtk/dcmdata/dchashdi.h:147: error: ‘NULL’ was not declared in this scope
/usr/include/dcmtk/dcmdata/dchashdi.h: At global scope:
/usr/include/dcmtk/dcmdata/dchashdi.h:257: error: expected ‘;’ before ‘&’ token
/usr/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDict::DcmHashDict(int)’:
/usr/include/dcmtk/dcmdata/dchashdi.h:216: error: ‘NULL’ was not declared in this scope
In file included from /usr/include/dcmtk/dcmdata/dctk.h:55,
from ../dcmdump.cc:35:
/usr/include/dcmtk/dcmdata/dcdict.h: In member function ‘int DcmDataDictionary::numberOfRepeatingTagEntries() const’:
/usr/include/dcmtk/dcmdata/dcdict.h:88: error: ‘const class DcmDictEntryList’ has no member named ‘size’
In file included from /usr/include/dcmtk/dcmdata/dcobject.h:41,
from /usr/include/dcmtk/dcmdata/dctk.h:59,
from ../dcmdump.cc:35:
/usr/include/dcmtk/ofstd/ofconsol.h: At global scope:
/usr/include/dcmtk/ofstd/ofconsol.h:95: error: expected ‘;’ before ‘&’ token
/usr/include/dcmtk/ofstd/ofconsol.h:105: error: expected `;' before ‘void’
/usr/include/dcmtk/ofstd/ofconsol.h:117: error: expected ‘;’ before ‘&’ token
/usr/include/dcmtk/ofstd/ofconsol.h:133: error: expected `;' before ‘ostream’
/usr/include/dcmtk/ofstd/ofconsol.h:133: error: expected ‘;’ before ‘*’ token
/usr/include/dcmtk/ofstd/ofconsol.h:139: error: expected ‘;’ before ‘&’ token
In file included from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ios:45,
from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ostream:45,
from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/iostream:45,
from ../dcmdump.cc:42:
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/exception:40: error: expected `;' before end of line
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/exception:40: error: expected `}' before end of line
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/exception:40: error: expected unqualified-id before end of line
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/exception:40: error: expected declaration before end of line
/usr/include/dcmtk/ofstd/oflist.h: In member function ‘T& OFIterator<T>::operator*() const [with T = DcmDictEntry*]’:
/usr/include/dcmtk/dcmdata/dchashdi.h:170: instantiated from here
/usr/include/dcmtk/ofstd/oflist.h:226: error: ‘assert’ was not declared in this scope
make: *** [dcmdump.o] Error 1
I really hope you can help me!!
regards,
Frank Blaauw