Issue compiling snapshot 3.61_20140731

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Oban
Posts: 19
Joined: Thu, 2014-07-24, 08:14

Issue compiling snapshot 3.61_20140731

#1 Post by Oban »

Hi gents,

using git, I dowloaded what I suppose being the latest snapshot of dcmtk as of 31st July ("- Added check on valid "IMAGE" SOP Classes:" etc.).
Simply doing this ...

Code: Select all

configure ; make all
... I get an error I thought it was formerly solved (include <iostream.h> vs. include <iostream>) :

Code: Select all

Administrateur@CRNX1 /h/dev/dcmtk-3.6.1_20140731/ofstd
$ make
(cd include && make ARCH="" all)
make[1]: Entering directory `/h/dev/dcmtk-3.6.1_20140731/ofstd/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/h/dev/dcmtk-3.6.1_20140731/ofstd/include'
(cd libsrc && make ARCH="" all)
make[1]: Entering directory `/h/dev/dcmtk-3.6.1_20140731/ofstd/libsrc'
c++     -DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS  -DNDEBUG  -c -I. -I. -I../include -I../../config/include   \
         -O  -Wall  oflist.cc
In file included from ../include/dcmtk/ofstd/ofstdinc.h:62:0,
                 from ../include/dcmtk/ofstd/oftypes.h:72,
                 from ../include/dcmtk/ofstd/oflist.h:42,
                 from oflist.cc:31:
../include/dcmtk/ofstd/ofstream.h:60:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>
                      ^
compilation terminated.
make[1]: *** [oflist.o] Error 1
make[1]: Leaving directgory `/h/dev/dcmtk-3.6.1_20140731/ofstd/libsrc'
make: *** [libsrc-all] Error 2
At least, snapshot from July 25 passes this step !
Well can some tell what am I doing wrong ?

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Issue compiling snapshot 3.61_20140731

#2 Post by J. Riesmeier »

Between July 25 and July 31, nothing has changed regarding ofstd or the basic configuration system, so I guess the reason is on your side. It's probably a configuration issue, so I would recommend to start from scratch, i.e. with a clean build directory and with the appropriate configure options.

Oban
Posts: 19
Joined: Thu, 2014-07-24, 08:14

Re: Issue compiling snapshot 3.61_20140731

#3 Post by Oban »

Hum... Well what would be "the appropriate configure option" to avoid including iostream.h ?

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Issue compiling snapshot 3.61_20140731

#4 Post by J. Riesmeier »

If it used to work before (i.e. with the July 25 version), why don't you just use the same configure options?

Anyway, there is a configure option that allows one to select the C++ ANSI standard includes (which is the default if found on the system) or the old C++ includes:

Code: Select all

> ./configure --help=short
[...]
  --enable-std-includes   use C++ ANSI standard includes (default: auto)
  --disable-std-includes  use old C++ includes
[...]
However, it looks like the configure process did not detect the standard includes and, therefore, tries to load the old ones (which cannot be found in the search path). You can check whether "USE_STD_CXX_INCLUDES" is defined in "config/include/dcmtk/config/osconfig.h".

PS: I assumed that you use GNU Autoconf (aka configure) on a Unix-like system.

Oban
Posts: 19
Joined: Thu, 2014-07-24, 08:14

Re: Issue compiling snapshot 3.61_20140731

#5 Post by Oban »

Thank you, I keep the advice.
I started all over, but this time using CMake (Windows Msys/gcc toolchain). After some struggle, it compiled.
All this mixture of paths, make, cmake, mingw32-make , mingw64 for 32 bits, configure script, ... this is completely confusing for someone that learned c++ with Borland Builder 5 !!!
Next challenge is to try to compile dcmtk with the 32 bits version of MinGW64 with msys shell in order to get rid of the intrin.h error. It already starts badly... Maybe another post another day...

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Issue compiling snapshot 3.61_20140731

#6 Post by J. Riesmeier »

Why don't you then use VisualStudio (e.g. the Express Version)? The DCMTK snapshots typically compile without problems on Windows (with VS) and on Linux (with gcc).

From a recent blog posting:
Of course, snapshots are no releases, which are usually tested on a large number of platforms. The README file in the snapshot directory also warns about this fact:

"Please note that this software is work in progress and not a final release. The software should compile on Linux systems with gcc 4.7.2 since this is our main development platform. Also on Windows systems, it usually works with VisualStudio 2008 and 2010. However, there is no guarantee that the software also compiles on your system."

The compiler versions will certainly change over time, but you can expect that we try our best to support all relevant operating systems and development environments — not necessarily for the next snapshot, but maybe for the next release.

Oban
Posts: 19
Joined: Thu, 2014-07-24, 08:14

Re: Issue compiling snapshot 3.61_20140731

#7 Post by Oban »

Yes, this is the real question sir.
The story is that I discovered c++ with BCB4, with an easy layout editor for event-driven graphical objects. When I wanted to evolve, because of the lack of resources or examples for that IDE, one showed me MSCV and I thought about it it was too complex to create the components on the fly, giving coordinates, deriving classes to create event listeners, ..., and at those times I was not aware of any kind of free version of MSVC (and I'm not a student).
One told me "to go to Eclipse CDT then". Also I had the strange idea that I could try to make some lines of code for Android (an error code dictionnary) with a light GUI build with FLTK, and there's an Android SDK plugin for Eclipse,...

So this is why I'm running Eclipse and the MinGW/GCC toolchain. But one day, maybe... (mainly if I can't make work MinGW64 with msys...)

Sorry for that story not greatly exciting for the readers, but I just wanted to reply to your question.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Issue compiling snapshot 3.61_20140731

#8 Post by Jan Schlamelcher »

Oban wrote:Sorry for that story not greatly exciting for the readers, but I just wanted to reply to your question.
I would say you happened to run in some typic pitfalls, so that might be very interesting for other readers in a similar situation.
Oban wrote:One told me "to go to Eclipse CDT then". Also I had the strange idea that I could try to make some lines of code for Android (an error code dictionnary) with a light GUI build with FLTK, and there's an Android SDK plugin for Eclipse,...
My personal experience with eclipse is that it's good for java, but very bad for C++. In a couple of projects i took part eclipse was voted as the IDE to use by some people having used it for java (in the first project including myself in voting for eclipse) only to replace it by some different approach when the project started moving, since the problems of eclipse became obvious then.

Maybe take a look at Code:Blocks, i never used i myself but i heard it was good. Or, if you really want to learn something, try setting up CMake for your project like we use it for DCMTK and use the code-editor of your choice in conjunction.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest