iostream.h ?

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

iostream.h ?

#1 Post by Veee »

Hi all,

I hope this is the dedicated section of the forum to post in, I apologize otherwise :)

I get the compilation error that iostream.h does'nt exist :
In file included from /usr/local/include/dcmtk/ofstd/ofstring.h:65,
from /usr/local/include/dcmtk/ofstd/offile.h:34,
from /usr/local/include/dcmtk/dcmdata/dcitem.h:35,
from /usr/local/include/dcmtk/dcmimgle/diimage.h:35,
from /usr/local/include/dcmtk/dcmimgle/dimoimg.h:37,
from /usr/local/include/dcmtk/dcmimgle/dcmimage.h:37,
from ../TestQtGL/src/GLWindow.h:13,
from ../TestQtGL/src/Main.h:7,
from ../TestQtGL/src/Main.cpp:1:
/usr/local/include/dcmtk/ofstd/ofstream.h:67: fatal error: iostream.h: Aucun fichier ou dossier de ce type (=Such file or folder doesn't exist)


This error happen when I just add these two lines:

Code: Select all

#include <dcmtk/config/osconfig.h>
#include <dcmtk/dcmimgle/dcmimage.h>
Here is a link to the ofstream.h file : http://support.dcmtk.org/docs/ofstream_8h-source.html I got from it that the <iostream.h> file is included only if #ifdef USE_STD_CXX_INCLUDES is true (line 35), otherwise it's <iostream>. But I don't get why I don't use the standard libraries... Or it's not that at all :)

I must have missed something simple, but I can't figure out what. Thanks for any help.

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#2 Post by Veee »

Oops, I forgot to specify that I use the 3.6.0 version on Ubuntu 10.10

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

#3 Post by Jörg Riesmeier »

DCMTK 3.6.0 has been tested intensively on an Ubuntu 10.10 (x86_64) system. Are you using GNU autoconf (configure) or CMake as the build system?

So according to the logs, you compiled and installed the DCMTK successfully to "/usr/local/" right?

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#4 Post by Veee »

Actually, I first had it by the command line sudo apt-get install libdmctk1-dev, but this is not the earliest version (3.5.xxx as far as I remember).
Then I removed the package, downloaded the earliest version and installed it with ./configure. As I didn't get any error, yes I guesss DCMTK is successfully installed :) (to /usr/local)

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

#5 Post by Jörg Riesmeier »

Did you define HAVE_CONFIG_H in your Makefile? See dcmtk/config/Makefile.def ...

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#6 Post by Veee »

No, I did not define such a thing. Where should I put this in my Makefile ?
What should I check for in the dcmtk/config/Makefile.def file ? Nothing like HAVE_CONFIG_H appears in it.

Thanks.

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

#7 Post by Jörg Riesmeier »

In dcmtk/config/Makefile.def there's a line "GLOBALDEFS = -DHAVE_CONFIG_H".
This define is also required for your application (in case you're using GNU autoconf).

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#8 Post by Veee »

Ok, I'll check it ASAP (which is, at least, not before tomorrow).

Thanks for your help.

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#9 Post by Veee »

Hi again,

After a little while, I'm back on dcmtk.

To make things clear, I removed everything I installed before, redownloaded the eariest version, unziped it and installed it through the GNU autoconf and I still have the same error.

The file dcmtk/config/Makefile.def does contain the line GLOBALDEFS = -DHAVE_CONFIG_H (the end of this line being -DUSE_NULL_SAFE_OFSTRING).
What exactly does that line mean ? Is that normal or was there an error somewhere during the configure process ?


Thanks

Veee
Posts: 7
Joined: Tue, 2011-01-25, 15:00

#10 Post by Veee »

Ok, I finally got it work.

In case this is useful, here is a topic which made me figure out what was wrong; I just had to add the line -DHAVE_CONFIG_H to my Makefile.
In my defense my Makefile is automatically created (I use QtCreator) and the response wasn't very clear, although I recognize mine weren't very smart either.

Anyways, thank you for your time :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest