ofstream.h Cannot open include file: 'iostream.h': No such f
Moderator: Moderator Team
ofstream.h Cannot open include file: 'iostream.h': No such f
Hello,
I use DCMTK 3.6.0 and Microsoft Visual Studio 2005 on a on a Windows Xp system.
I compiled DCMTK using CMAKE 2.8.8
I am trying to compile my own project and I had compilation errors:
ofstream.h(67) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
how to correct this error?
thank you
I use DCMTK 3.6.0 and Microsoft Visual Studio 2005 on a on a Windows Xp system.
I compiled DCMTK using CMAKE 2.8.8
I am trying to compile my own project and I had compilation errors:
ofstream.h(67) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
how to correct this error?
thank you
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Are you mixing the two different implementations of I/O streams that are contained in the MS VS compilers? Is USE_STD_CXX_INCLUDES defined in your "dcmtk/config/osconfig.h" include file?
Re: ofstream.h Cannot open include file: 'iostream.h': No su
I have no idea but I think that's the problemJ. Riesmeier wrote:Are you mixing the two different implementations of I/O streams that are contained in the MS VS compilers?
Yes USE_STD_CXX_INCLUDES is defined in dcmtk/config/osconfig.hJ. Riesmeier wrote:Is USE_STD_CXX_INCLUDES defined in your "dcmtk/config/osconfig.h" include file?
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Then you are probably including DCMTK headers in your source files without including "dcmtk/config/osconfig.h" at the very beginning of these files.
Code: Select all
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "<some other DCMTK header file>"
Re: ofstream.h Cannot open include file: 'iostream.h': No su
NOJ. Riesmeier wrote:Then you are probably including DCMTK headers in your source files without including "dcmtk/config/osconfig.h" at the very beginning of these files.
I'm including DCMTK headers like this :
Code: Select all
//Include Files for JpegLosless Version 2
#include "dcmtk/config/osconfig.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/dcmdata/dctk.h"
#include "dcmtk/dcmdata/dcostrma.h"
#include "dcmtk/dcmdata/dcitem.h"
#include "dcmtk/dcmdata/cmdlnarg.h"
#include "dcmtk/ofstd/ofconapp.h"
#include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */
#include "dcmtk/dcmjpeg/djdecode.h" /* for dcmjpeg decoders */
#include "dcmtk/dcmjpeg/djencode.h" /* for dcmjpeg encoders */
#include "dcmtk/dcmjpeg/djrplol.h" /* for DJ_RPLossless */
#include "dcmtk/dcmjpeg/djrploss.h" /* for DJ_RPLossy */
#include "dcmtk/dcmjpeg/dipijpeg.h" /* for dcmimage JPEG plugin */
#include "dcmtk/dcmimage/diregist.h" /* include to support color images */
#include "dcmtk/dcmdata/dcrledrg.h" /* for DcmRLEDecoderRegistration */
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Why are you including "dcmtk/ofstd/ofstdinc.h" without defining any INCLUDE_xxx macro before this particular line? Basically, this should do nothing ... (look into the file).
Re: ofstream.h Cannot open include file: 'iostream.h': No su
I I removed the "dcmtk/ofstd/ofstdinc.h"
but I still have the error
ofstream.h(67) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
but I still have the error
ofstream.h(67) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
-
- Posts: 61
- Joined: Wed, 2010-05-19, 09:27
- Location: Taipei, Taiwan
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Please try to check "Ignore standard include path" is checked in project settings->C++->preprocessor.
Re: ofstream.h Cannot open include file: 'iostream.h': No su
When building DCMTK ?
-
- Posts: 61
- Joined: Wed, 2010-05-19, 09:27
- Location: Taipei, Taiwan
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Both methods could be reliable:loveDcmtk wrote:When building DCMTK ?
1. Modify in Visual Studio manually.
1. CMake: set_target_properties( target PROPERTIES COMPILE_FLAGS “/X" )
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Hi everybody, I have just the same problem and it begun when updating my code from version 3.5.5 _xxx to 3.6.0. I compiled DCMTK with CMake 2.8.10.2 and after compiling I got that "fatal error C1083: cannot open include file: 'iostream.h'" message. I´m developing on VS2008 and Windows XP-32. I´ve tried the solutions posted by Mr Riesmeier and Chung but still have the same error.As a side note, if I redirect the include files´search back to 3.5.5 it compiles OK.
Can you give me a hint of what I´m doing wrong? Thanks.
Can you give me a hint of what I´m doing wrong? Thanks.
-
- Posts: 61
- Joined: Wed, 2010-05-19, 09:27
- Location: Taipei, Taiwan
Re: ofstream.h Cannot open include file: 'iostream.h': No su
Since VS 6 or latest version is looking for <iostream>, instead of <iostream.h>. Otherwise, you can define HAVE_STD_NAMESPACE in "dcmtk/config/osconfig.h".
Another way is to change the line in "dcmtk\ofstd\ofstream.h"
to
However, the second method I did not test yet.
Another way is to change the line in "dcmtk\ofstd\ofstream.h"
Code: Select all
#include <iostream.h>
Code: Select all
#include <iostream>
Re: ofstream.h Cannot open include file: 'iostream.h': No su
I finally found the reason of this error, it seems that the CMake version I´m using stores osconfig.h in a different directory than the older version I used, that is "%DCMTKROOT%\include" and left some standard almost empty osconfig.h in "%DCMTKROOT%\config\include", that was where the former CMake version put it.
I don´t know if I misconfigured CMake or it´s the expected behaviour.
Thanks a lot.
I don´t know if I misconfigured CMake or it´s the expected behaviour.
Thanks a lot.
Who is online
Users browsing this forum: No registered users and 1 guest