Eclipse and DCMTK 3.5.4

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

Eclipse and DCMTK 3.5.4

#1 Post by donnonl »

Hi all,

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
Last edited by donnonl on Fri, 2009-03-06, 11:17, edited 1 time in total.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

Per
Posts: 99
Joined: Mon, 2007-09-03, 10:53
Location: Trondheim, Norway
Contact:

#2 Post by Per »

Have you built and installed dcmtk separately first, so that the included cfunix.h has been correctly generated?

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#3 Post by donnonl »

*Edit*
I'm now trying to reinstall the the dcmtk to check if something might have gone wrong (btw for this i'm using the install document in de dcmtk). I'll get back on this.

regards
Last edited by donnonl on Fri, 2009-03-06, 11:17, edited 1 time in total.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

Reinstall complete (I guess)

#4 Post by donnonl »

Oke I now reinstalled the dicom tool kit, now i've got lots and lots of errors in my Eclipse project

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"
../dcmdump.cc:33:98: error: dcmtk/config/osconfig.h: No such file or directory
../dcmdump.cc:34:34: error: dcmtk/ofstd/ofstream.h: No such file or directory
../dcmdump.cc:35:32: error: dcmtk/dcmdata/dctk.h: No such file or directory
../dcmdump.cc:36:35: error: dcmtk/dcmdata/dcdebug.h: No such file or directory
../dcmdump.cc:37:36: error: dcmtk/dcmdata/cmdlnarg.h: No such file or directory
../dcmdump.cc:38:34: error: dcmtk/ofstd/ofconapp.h: No such file or directory
../dcmdump.cc:39:68: error: dcmtk/dcmdata/dcuid.h: No such file or directory
../dcmdump.cc:40:78: error: dcmtk/dcmdata/dcistrmz.h: No such file or directory
../dcmdump.cc:44:34: error: dcmtk/ofstd/ofstdinc.h: No such file or directory
../dcmdump.cc:53: error: expected ‘,’ or ‘;’ before ‘OFFIS_DCMTK_VERSION’
../dcmdump.cc:61: error: ‘ostream’ was not declared in this scope
../dcmdump.cc:61: error: ‘out’ was not declared in this scope
../dcmdump.cc:62: error: expected primary-expression before ‘const’
../dcmdump.cc:63: error: expected primary-expression before ‘const’
../dcmdump.cc:64: error: expected primary-expression before ‘const’
../dcmdump.cc:65: error: expected primary-expression before ‘const’
../dcmdump.cc:66: error: expected primary-expression before ‘const’
../dcmdump.cc:67: error: expected primary-expression before ‘const’
../dcmdump.cc:68: error: expected primary-expression before ‘const’
../dcmdump.cc:69: error: expected primary-expression before ‘const’
../dcmdump.cc:69: error: initializer expression list treated as compound expression
../dcmdump.cc:73: error: ‘OFBool’ does not name a type
../dcmdump.cc:74: error: ‘OFBool’ does not name a type
../dcmdump.cc:78: error: expected initializer before ‘*’ token
../dcmdump.cc:79: error: ‘OFCmdUnsignedInt’ does not name a type
../dcmdump.cc:81: error: ‘OFBool’ does not name a type
../dcmdump.cc: In function ‘int main(int, char**)’:
../dcmdump.cc:121: error: ‘OFBool’ was not declared in this scope
../dcmdump.cc:121: error: expected `;' before ‘loadIntoMemory’
../dcmdump.cc:122: error: ‘size_t’ was not declared in this scope
../dcmdump.cc:122: error: expected `;' before ‘printFlags’
../dcmdump.cc:123: error: expected `;' before ‘printFilename’
../dcmdump.cc:124: error: expected `;' before ‘writePixelData’
../dcmdump.cc:125: error: ‘E_FileReadMode’ was not declared in this scope
../dcmdump.cc:125: error: expected `;' before ‘readMode’
../dcmdump.cc:126: error: ‘E_TransferSyntax’ was not declared in this scope
../dcmdump.cc:126: error: expected `;' before ‘xfer’
../dcmdump.cc:127: error: expected `;' before ‘stopOnErrors’
../dcmdump.cc:128: error: ‘NULL’ was not declared in this scope
../dcmdump.cc:144: error: ‘SetDebugLevel’ was not declared in this scope
../dcmdump.cc:146: error: ‘OFConsoleApplication’ was not declared in this scope
../dcmdump.cc:146: error: expected `;' before ‘app’
../dcmdump.cc:147: error: ‘OFCommandLine’ was not declared in this scope
../dcmdump.cc:147: error: expected `;' before ‘cmd’
../dcmdump.cc:148: error: ‘cmd’ was not declared in this scope
../dcmdump.cc:151: error: ‘OFCmdParam’ has not been declared
../dcmdump.cc:155: error: ‘OFTrue’ was not declared in this scope
../dcmdump.cc:219: error: ‘prepareCmdLineArgs’ was not declared in this scope
../dcmdump.cc:220: error: ‘app’ was not declared in this scope
../dcmdump.cc:220: error: ‘OFCommandLine’ is not a class or namespace
../dcmdump.cc:229: error: ‘CERR’ was not declared in this scope
../dcmdump.cc:229: error: ‘endl’ was not declared in this scope
../dcmdump.cc:251: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:251: error: ‘ERM_autoDetect’ was not declared in this scope
../dcmdump.cc:252: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:252: error: ‘ERM_fileOnly’ was not declared in this scope
../dcmdump.cc:253: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:253: error: ‘ERM_dataset’ was not declared in this scope
../dcmdump.cc:258: error: ‘xfer’ was not declared in this scope
../dcmdump.cc:258: error: ‘EXS_Unknown’ was not declared in this scope
../dcmdump.cc:260: error: ‘dcmAutoDetectDatasetXfer’ was not declared in this scope
../dcmdump.cc:263: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:263: error: ‘ERM_dataset’ was not declared in this scope
../dcmdump.cc:264: error: ‘xfer’ was not declared in this scope
../dcmdump.cc:264: error: ‘EXS_LittleEndianExplicit’ was not declared in this scope
../dcmdump.cc:268: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:268: error: ‘ERM_dataset’ was not declared in this scope
../dcmdump.cc:269: error: ‘xfer’ was not declared in this scope
../dcmdump.cc:269: error: ‘EXS_BigEndianExplicit’ was not declared in this scope
../dcmdump.cc:273: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:273: error: ‘ERM_dataset’ was not declared in this scope
../dcmdump.cc:274: error: ‘xfer’ was not declared in this scope
../dcmdump.cc:274: error: ‘EXS_LittleEndianImplicit’ was not declared in this scope
../dcmdump.cc:281: error: ‘dcmAcceptOddAttributeLength’ was not declared in this scope
../dcmdump.cc:285: error: ‘dcmAcceptOddAttributeLength’ was not declared in this scope
../dcmdump.cc:285: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:292: error: ‘dcmEnableCP246Support’ was not declared in this scope
../dcmdump.cc:296: error: ‘dcmEnableCP246Support’ was not declared in this scope
../dcmdump.cc:296: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:303: error: ‘dcmEnableUnknownVRConversion’ was not declared in this scope
../dcmdump.cc:303: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:307: error: ‘dcmEnableUnknownVRConversion’ was not declared in this scope
../dcmdump.cc:314: error: ‘dcmEnableAutomaticInputDataCorrection’ was not declared in this scope
../dcmdump.cc:318: error: ‘dcmEnableAutomaticInputDataCorrection’ was not declared in this scope
../dcmdump.cc:318: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:337: error: ‘maxReadLength’ was not declared in this scope
../dcmdump.cc:341: error: ‘loadIntoMemory’ was not declared in this scope
../dcmdump.cc:342: error: ‘loadIntoMemory’ was not declared in this scope
../dcmdump.cc:342: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:346: error: ‘printFlags’ was not declared in this scope
../dcmdump.cc:346: error: ‘DCMTypes’ has not been declared
../dcmdump.cc:347: error: ‘printFlags’ was not declared in this scope
../dcmdump.cc:347: error: ‘DCMTypes’ has not been declared
../dcmdump.cc:351: error: ‘printFilename’ was not declared in this scope
../dcmdump.cc:354: error: ‘stopOnErrors’ was not declared in this scope
../dcmdump.cc:355: error: ‘stopOnErrors’ was not declared in this scope
../dcmdump.cc:355: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:358: error: ‘OFCommandLine’ is not a class or namespace
../dcmdump.cc:363: error: ‘addPrintTagName’ was not declared in this scope
../dcmdump.cc:364: error: ‘OFCommandLine’ is not a class or namespace
../dcmdump.cc:371: error: ‘printAllInstances’ was not declared in this scope
../dcmdump.cc:376: error: ‘printAllInstances’ was not declared in this scope
../dcmdump.cc:376: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:384: error: ‘prependSequenceHierarchy’ was not declared in this scope
../dcmdump.cc:389: error: ‘prependSequenceHierarchy’ was not declared in this scope
../dcmdump.cc:389: error: ‘OFFalse’ was not declared in this scope
../dcmdump.cc:396: error: ‘writePixelData’ was not declared in this scope
../dcmdump.cc:403: error: ‘dcmDataDict’ was not declared in this scope
../dcmdump.cc:405: error: ‘CERR’ was not declared in this scope
../dcmdump.cc:407: error: ‘DCM_DICT_ENVIRONMENT_VARIABLE’ was not declared in this scope
../dcmdump.cc:415: error: ‘printFilename’ was not declared in this scope
../dcmdump.cc:419: error: ‘COUT’ was not declared in this scope
../dcmdump.cc:419: error: ‘endl’ was not declared in this scope
../dcmdump.cc:421: error: ‘COUT’ was not declared in this scope
../dcmdump.cc:421: error: ‘endl’ was not declared in this scope
../dcmdump.cc:423: error: ‘COUT’ was not declared in this scope
../dcmdump.cc:423: error: ‘readMode’ was not declared in this scope
../dcmdump.cc:423: error: ‘xfer’ was not declared in this scope
../dcmdump.cc:423: error: ‘printFlags’ was not declared in this scope
../dcmdump.cc:423: error: ‘loadIntoMemory’ was not declared in this scope
../dcmdump.cc:423: error: ‘stopOnErrors’ was not declared in this scope
../dcmdump.cc:424: error: ‘writePixelData’ was not declared in this scope
../dcmdump.cc:424: error: ‘dumpFile’ cannot be used as a function
../dcmdump.cc: At global scope:
../dcmdump.cc:430: error: variable or field ‘printResult’ declared void
../dcmdump.cc:430: error: ‘ostream’ was not declared in this scope
../dcmdump.cc:430: error: ‘out’ was not declared in this scope
../dcmdump.cc:430: error: ‘DcmStack’ was not declared in this scope
../dcmdump.cc:430: error: ‘stack’ was not declared in this scope
../dcmdump.cc:430: error: ‘size_t’ was not declared in this scope
../dcmdump.cc:52: warning: ‘rcsid’ defined but not used
../dcmdump.cc:77: warning: ‘printTagNames’ defined but not used
make: *** [dcmdump.o] Error 1
These probably are errors because the dcmtk is not included. I have had this before, but last time I used a RPM file from
http://rpmfind.net/linux/RPM/sourceforg ... .i386.html

but i don't think this is the right way to do this, any suggestions to do this correct?

- Frank
Last edited by donnonl on Fri, 2009-03-06, 11:17, edited 1 time in total.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#5 Post by donnonl »

Oke, fixed the last error by including the correct directory (doh..)

Now i'm back with the first error:

Code: Select all

**** Build of configuration Debug for project dcmtkDumper ****

make all 
Building file: ../dcmdump.cc
Invoking: GCC C++ Compiler
g++ -I/usr/local/dicom/include/ -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/local/dicom/include/dcmtk/ofstd/ofstream.h:63:22: warning: iostream.h: No such file or directory
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:64:21: warning: fstream.h: No such file or directory
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:76:2: error: #error DCMTK needs stringstream or strstream type
/usr/local/dicom/include/dcmtk/ofstd/ofstream.h:78:21: warning: iomanip.h: No such file or directory
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:38,
                 from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:54,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:58:2: error: #error Your C++ compiler cannot handle class templates:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:498:2: error: #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 ../dcmdump.cc:35:
/usr/local/dicom/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/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/dctk.h:40,
                 from ../dcmdump.cc:35:
/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/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 ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:78: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:108: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:108: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:118: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:131: error: expected `)' before ‘rep’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:182: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:182: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:189: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:202: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:213: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:213: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:220: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:233: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:245: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:255: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:263: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:272: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:279: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:296: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:307: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:316: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:326: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:334: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:346: error: expected `;' before ‘char’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:346: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:357: error: expected `;' before ‘char’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:357: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:373: error: declaration of ‘operator[]’ as non-function
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:373: error: expected ‘;’ before ‘(’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:384: error: expected `;' before ‘const’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:402: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:411: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:429: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:434: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:442: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:462: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:474: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:481: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:481: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:508: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:508: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:519: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:519: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:520: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:520: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:537: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:537: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:538: error: ‘size_t’ has not been declared
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:549: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:561: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:572: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:583: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:594: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:606: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:617: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:628: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:639: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:651: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:662: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:673: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:683: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:694: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:704: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:714: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:724: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:735: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:745: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:755: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:766: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:778: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:789: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:800: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:807: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:108: error: ‘OFString_npos’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:182: error: ‘OFString_npos’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:213: error: ‘OFString_npos’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:481: error: ‘OFString_npos’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:538: error: ‘OFString_npos’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h: In member function ‘char OFString::operator[](int) const’:
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:359: error: ‘const class OFString’ has no member named ‘size’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:362: error: ‘const class OFString’ has no member named ‘size’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:362: error: ‘assert’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h: In member function ‘OFBool OFString::empty() const’:
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:421: error: ‘const class OFString’ has no member named ‘size’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h: In member function ‘void OFString::clear()’:
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:451: error: ‘class OFString’ has no member named ‘erase’
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h: At global scope:
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:817: error: expected constructor, destructor, or type conversion before ‘&’ token
/usr/local/dicom/include/dcmtk/ofstd/ofstring.h:825: error: expected constructor, destructor, or type conversion before ‘&’ token
In file included 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 ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h: In constructor ‘OFCondition::OFCondition(OFConditionString*)’:
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h:321: error: ‘assert’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h: In constructor ‘OFCondition::OFCondition(const OFConditionConst&)’:
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h:337: error: ‘assert’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h: In copy constructor ‘OFCondition::OFCondition(const OFCondition&)’:
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h:344: error: ‘assert’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h: In member function ‘OFCondition& OFCondition::operator=(const OFCondition&)’:
/usr/local/dicom/include/dcmtk/ofstd/ofcond.h:366: error: ‘assert’ was not declared in this scope
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dcxfer.h:40,
                 from /usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:40,
                 from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:41,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dcvr.h: At global scope:
/usr/local/dicom/include/dcmtk/dcmdata/dcvr.h:210: error: ‘size_t’ does not name a type
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:41,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:51: error: expected ‘,’ or ‘...’ before ‘valWidth’
/usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:51: error: ISO C++ forbids declaration of ‘size_t’ with no type
/usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:55: error: expected ‘,’ or ‘...’ before ‘valWidth’
/usr/local/dicom/include/dcmtk/dcmdata/dcswap.h:55: error: ISO C++ forbids declaration of ‘size_t’ with no type
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:46,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dcuid.h:138: error: ‘NULL’ was not declared in this scope
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:51,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dctagkey.h:88: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/dcmdata/dctagkey.h:88: error: ‘ostream’ is neither function nor member function; cannot be declared friend
/usr/local/dicom/include/dcmtk/dcmdata/dctagkey.h:88: error: expected ‘;’ before ‘&’ token
/usr/local/dicom/include/dcmtk/dcmdata/dctagkey.h:104: error: expected constructor, destructor, or type conversion before ‘&’ token
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:53,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:370: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:370: error: ‘ostream’ is neither function nor member function; cannot be declared friend
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:370: error: expected ‘;’ before ‘&’ token
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h: In member function ‘int DcmDictEntry::privateCreatorMatch(const char*) const’:
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:154: error: ‘NULL’ was not declared in this scope
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:155: error: ‘strcmp’ was not declared in this scope
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h: In member function ‘int DcmDictEntry::contains(const char*) const’:
/usr/local/dicom/include/dcmtk/dcmdata/dcdicent.h:333: error: ‘strcmp’ was not declared in this scope
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:38,
                 from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:54,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h: In constructor ‘OFListLinkBase::OFListLinkBase()’:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:109: error: ‘NULL’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/oflist.h: At global scope:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:125: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:133: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/oflist.h: In constructor ‘OFIterator<T>::OFIterator()’:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:192: error: ‘NULL’ was not declared in this scope
/usr/local/dicom/include/dcmtk/ofstd/oflist.h: In member function ‘T& OFIterator<T>::operator*() const’:
/usr/local/dicom/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/local/dicom/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/local/dicom/include/dcmtk/ofstd/oflist.h: At global scope:
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:352: error: ‘size_t’ does not name a type
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:395: error: ‘size_t’ has not been declared
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:54,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDictIterator::DcmHashDictIterator()’:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:138: error: ‘NULL’ was not declared in this scope
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDictIterator::DcmHashDictIterator(const DcmHashDict*, OFBool)’:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:147: error: ‘NULL’ was not declared in this scope
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h: At global scope:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:257: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:257: error: expected ‘;’ before ‘&’ token
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h: In constructor ‘DcmHashDict::DcmHashDict(int)’:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:216: error: ‘NULL’ was not declared in this scope
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:55,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/dcmdata/dcdict.h: In member function ‘int DcmDataDictionary::numberOfRepeatingTagEntries() const’:
/usr/local/dicom/include/dcmtk/dcmdata/dcdict.h:88: error: ‘const class DcmDictEntryList’ has no member named ‘size’
In file included from /usr/local/dicom/include/dcmtk/dcmdata/dcobject.h:41,
                 from /usr/local/dicom/include/dcmtk/dcmdata/dctk.h:59,
                 from ../dcmdump.cc:35:
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h: At global scope:
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:95: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:95: error: expected ‘;’ before ‘&’ token
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:105: error: expected `;' before ‘void’
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:117: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:117: error: expected ‘;’ before ‘&’ token
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:133: error: expected `;' before ‘ostream’
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:133: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:133: error: expected ‘;’ before ‘*’ token
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:139: error: ISO C++ forbids declaration of ‘ostream’ with no type
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:139: error: expected ‘;’ before ‘&’ token
../dcmdump.cc:540: error: expected `;' at end of input
../dcmdump.cc:540: error: expected `}' at end of input
/usr/local/dicom/include/dcmtk/ofstd/ofconsol.h:110: error: expected unqualified-id at end of input
/usr/local/dicom/include/dcmtk/ofstd/oflist.h: In member function ‘T& OFIterator<T>::operator*() const [with T = DcmDictEntry*]’:
/usr/local/dicom/include/dcmtk/dcmdata/dchashdi.h:170:   instantiated from here
/usr/local/dicom/include/dcmtk/ofstd/oflist.h:226: error: ‘assert’ was not declared in this scope
make: *** [dcmdump.o] Error 1
So you now know exactly what i've done, i hope you have got an answer!!! pretty desperate atm :roll:

btw the file /usr/local/dicom/include/dcmtk/config/cfunix.h does exist..

Regards,
Frank
Last edited by donnonl on Fri, 2009-03-06, 11:17, edited 1 time in total.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

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

#6 Post by Jörg Riesmeier »

Obviously, your include files are expected in "/usr/local/dicom/include" but they are not there. So first of all, you need to specify where the DCMTK includes are ... and don't forget to define HAVE_CONFIG_H.

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#7 Post by donnonl »

Jörg Riesmeier wrote:Obviously, your include files are expected in "/usr/local/dicom/include" but they are not there. So first of all, you need to specify where the DCMTK includes are ...

Code: Select all

[feddev@localhost include]$ pwd
/usr/local/dicom/include
[feddev@localhost include]$ ls
dcmtk
[feddev@localhost include]$ cd dcmtk
[feddev@localhost dcmtk]$ ls
config   dcmimage  dcmjpeg  dcmpstat  dcmsign  dcmtls  ofstd
dcmdata  dcmimgle  dcmnet   dcmqrdb   dcmsr    dcmwlm
That's correct right?
and don't forget to define HAVE_CONFIG_H.
What do you mean by this? should I add -D HAVE_CONFIG_H to the gcc command? (Command: g++ -D HAVE_CONFIG_H)

Regards
Last edited by donnonl on Fri, 2009-03-06, 11:18, edited 1 time in total.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

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

#8 Post by Michael Onken »

Hi,

use -DHAVE_CONFIG_H. Use the same defines for your DCMTK-related code that is being used when building DCMTK itself with configure/make (you can copy from console). Of course only one DCMTK-include directory must be given (as you also specified correctly).

Regards,
Michael

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#9 Post by donnonl »

Michael Onken wrote:Hi,

use -DHAVE_CONFIG_H. Use the same defines for your DCMTK-related code that is being used when building DCMTK itself with configure/make (you can copy from console). Of course only one DCMTK-include directory must be given (as you also specified correctly).

Regards,
Michael
Ok thank you, so I should add -DHAVE_CONFIG_H to the GCC G++ Compiler? or should I add it to the GCC C++ Linker?

I think my g++ compiler now does the following:
g++ -I/usr/local/dicom/include/ -O2 -g -Wall -c -fmessage-length=0 -DHAVE_CONFIG_H

(I don't know what that does to be honest :oops: )

regards
Frank
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

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

#10 Post by Michael Onken »

Download DCMTK source code, and compile it with ./configure and make as described in the INSTALL file (comes with source code). Look (e. g.) how dcmdump.cc is compiled to dcmdump executable during the "make" execution. You see something like this:
c++ -DHAVE_CONFIG_H -DDEBUG -c -I. -I. -I../include -I../../config/include -I../../ofstd/include \
-g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall dcmdump.cc

c++ -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -L../libi2d -L../libsrc -L../../ofstd/libsrc -o dcmdump dcmdump.o -ldcmdata -lofstd -lz -lm -lrt -lpthread -lnsl
The first line is compiling dcmdump.cc to dcmdump.o and the second is linking dcmdump.o with all libraries needed to dcmdump executable. So, for compiling take all -D_ definitionsn and add include paths to libxml and so on, and for linking also take care of the libraries (-L and -l).

First try to compile stuff. If that works, go on with linking.

Regards,
Michael

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#11 Post by donnonl »

Danke schön michael:)

It will be the first time i'll try when I come back on monday :)

Regards
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#12 Post by donnonl »

Hey guys,

Thanks for the post Friday, it really helped me out..
Compiling and linking now works, only one error left, but I think I can figure that out myself :)

Code: Select all

**** Build of configuration Debug for project dcmtkDumper ****

make all 
Building file: ../dcmdump.cc
Invoking: GCC C++ Compiler
c++ -I/usr/local/dicom/include/ -O0 -g3 -Wall -DHAVE_CONFIG_H  -DNDEBUG  -c -I. -I. -I../include -I../../config/include -I../../ofstd/include -O -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -MMD -MP -MF"dcmdump.d" -MT"dcmdump.d" -o"dcmdump.o" "../dcmdump.cc"
Finished building: ../dcmdump.cc
 
Building target: dcmtkDumper
Invoking: GCC C++ Linker
c++ -L/usr/local/dicom/lib -O  -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall   -L../libsrc -L../../ofstd/libsrc -o dcmdump dcmdump.o -ldcmdata -lofstd -lz -lm -lrt -lpthread -lnsl -o"dcmtkDumper"  ./dcmdump.o   -ldcmdata -lofstd
./dcmdump.o: In function `main':
/root/workspace/dcmtkDumper/Debug/../dcmdump.cc:232: multiple definition of `main'
dcmdump.o:/root/workspace/dcmtkDumper/Debug/../dcmdump.cc:232: first defined here
collect2: ld returned 1 exit status
make: *** [dcmtkDumper] Error 1
Regards,
Frank
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#13 Post by donnonl »

donnonl wrote:Hey guys,

Thanks for the post Friday, it really helped me out..
Compiling and linking now works, only one error left, but I think I can figure that out myself :)

Code: Select all

**** Build of configuration Debug for project dcmtkDumper ****

make all 
Building file: ../dcmdump.cc
Invoking: GCC C++ Compiler
c++ -I/usr/local/dicom/include/ -O0 -g3 -Wall -DHAVE_CONFIG_H  -DNDEBUG  -c -I. -I. -I../include -I../../config/include -I../../ofstd/include -O -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -MMD -MP -MF"dcmdump.d" -MT"dcmdump.d" -o"dcmdump.o" "../dcmdump.cc"
Finished building: ../dcmdump.cc
 
Building target: dcmtkDumper
Invoking: GCC C++ Linker
c++ -L/usr/local/dicom/lib -O  -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall   -L../libsrc -L../../ofstd/libsrc -o dcmdump dcmdump.o -ldcmdata -lofstd -lz -lm -lrt -lpthread -lnsl -o"dcmtkDumper"  ./dcmdump.o   -ldcmdata -lofstd
./dcmdump.o: In function `main':
/root/workspace/dcmtkDumper/Debug/../dcmdump.cc:232: multiple definition of `main'
dcmdump.o:/root/workspace/dcmtkDumper/Debug/../dcmdump.cc:232: first defined here
collect2: ld returned 1 exit status
make: *** [dcmtkDumper] Error 1
Regards,
Frank

Code: Select all


**** Build of configuration Debug for project dcmtkDumper ****

make all 
Building file: ../dcmdump.cc
Invoking: GCC C++ Compiler
c++ -I/usr/local/dicom/include/ -O0 -g3 -Wall -DHAVE_CONFIG_H  -DNDEBUG  -c -I. -I. -I../include -I../../config/include -I../../ofstd/include -O -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -MMD -MP -MF"dcmdump.d" -MT"dcmdump.d" -o"dcmdump.o" "../dcmdump.cc"
Finished building: ../dcmdump.cc
 
Building target: dcmtkDumper
Invoking: GCC C++ Linker
c++ -L/usr/local/dicom/lib -O  -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall   -L../libsrc -L../../ofstd/libsrc -o -ldcmdata -lofstd -lz -lm -lrt -lpthread -lnsl -o"dcmtkDumper"  ./dcmdump.o   -ldcmdata -lofstd
Finished building target: dcmtkDumper
 
Yey!! Thank you all for the support, i'm now writing a tutorial so no one will encounter these problems again :)

Regards,
Frank.
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

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

#14 Post by Michael Onken »

Hi Frank,
Finished building target: dcmtkDumper
fine :-)!
i'm now writing a tutorial
That's a good idea; just insert a link into this thread so maybe others can find you tutorial when searching the forum :-)

Regards,
Michael

donnonl
Posts: 13
Joined: Thu, 2009-03-05, 14:47

#15 Post by donnonl »

The tutorial is done, its located here:

http://code.google.com/p/dcmtk-and-eclipse/

Thanks again for everything guys :)

Regards
[img]http://www.wenckebachinstituut.nl/nieuwsbrief/2008nummer4/images/umcg-logo-klein_000.jpg[/img]

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest