[Insight-users] strstream errors when compiling itk

Luis Ibanez luis . ibanez at kitware . com
Wed, 03 Sep 2003 09:52:10 -0400


Hi Evelyne,

Just add the CMake command


LINK_DIRECTORIES(
   c:\directory1
   c:\directory2
   d:\directory3
)



to the CMakeLists.txt file of your project.


Regards,


   Luis


---------------
Evelyne Balteau wrote:
> That is just what I was wondering : how could you set this directories 
> list project-dependant ?
> Could you tell me how to use CMake for this purpose ?
> Thank you a lot !
> Best regards,
> Evelyne
> 
>     ----- Original Message -----
>     *From:* Luis Ibanez <mailto:luis . ibanez at kitware . com>
>     *To:* Evelyne Balteau <mailto:e . balteau at ulg . ac . be>
>     *Cc:* insight-users at public . kitware . com
>     <mailto:insight-users at public . kitware . com>
>     *Sent:* Wednesday, September 03, 2003 9:10 AM
>     *Subject:* Re: [Insight-users] strstream errors when compiling itk
> 
> 
>     Hi Evelyne,
> 
>     I'm glad you found the solution to your problem.
> 
>     You may want to clean the Tools->Options->Directories
>     in Visual Studio.  CMake makes this VC++ options obsolete.
> 
>     As you just found, the annoying danger of this VC menu
>     is that the directories there are shared by all the
>     projects you have.
> 
>     A CMake-generated VC++ workspace will help you to
>     maintain project dependencies without having to be
>     exposed to the vulnerabilities of VisualStudio.
> 
> 
> 
>        Regards,
> 
> 
>          Luis
> 
> 
>     ----------------------
>     Evelyne Balteau wrote:
>      > Thanks, Luis !
>      > I had it done yet, and it did not work, but finally I found what was
>      > happening...
>     ....
>      > I had a mixing problem with another library I needed to compile
>     another
>      > application, and which was listed in the Tools->Options->Directories
>      > /*before/* the VS6.0's one...
>      > That's all !!!
>      > Evelyne
>      >
>      >     ----- Original Message -----
>      >     *From:* Luis Ibanez <mailto:luis . ibanez at kitware . com>
>      >     *To:* Evelyne Balteau <mailto:e . balteau at ulg . ac . be>
>      >     *Cc:* insight-users at itk . org <mailto:insight-users at itk . org>
>     <mailto:insight-users at itk . org>
>      >     *Sent:* Wednesday, September 03, 2003 5:08 AM
>      >     *Subject:* Re: [Insight-users] strstream errors when
>     compiling itk
>      >
>      >
>      >     Hi Evelyne,
>      >
>      >     Since you are getting errors with the VC98  own headers
>      >     this looks like a compiler installation problem.
>      >
>      >     You probably would not like the suggestion... but ... you
>      >     may have to reinstall your VC60 compiler.
>      >
>      >
>      >
>      >         Luis
>      >
>      >
>      >     -------------------------
>      >     Evelyne Balteau wrote:
>      >      > Hi all,
>      >      >
>      >      > I sent a question some times ago about errors when
>     compiling itk...
>      >      > I still get the same kind of errors (see below for some
>     examples),
>      >      > although I don't get them when compiling itk on my home
>     computer...
>      >      > Both computers (my home's and my office's) are working under
>      >     Windows XP
>      >      > Professional, with MSVisualStudio 6.0 - sp5.
>      >      > The only things differing are the windows XP Service Packs and
>      >     HotFixes,
>      >      > which are not installed at home (I don't have any internet
>      >     connection)...
>      >      > If anybody has an idea about what happens...
>      >      > Or an idea about what I could try to solve this problem...
>      >      > Nice to let me know...
>      >      >
>      >      > Thanks a lot !
>      >      >
>      >      > Evelyne
>      >      >
>      >      >
>      >    
>     -----------------------------------------------------------------------------------------------------------------------------
>      >      > Just some lines of the error messages...
>      >      > Most of them concern the strstream header file....
>      >      >
>      >      > --------------------Configuration: ITKDICOMParser - Win32
>      >      > Debug--------------------
>      >      > Compiling...
>      >      > DICOMFile.cxx
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(20) :
>     error C2061:
>      >      > syntax error : identifier '_Strstate'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(21) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(21) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(26) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(26) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(28) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(28) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(31) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(31) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(33) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(33) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(40) :
>     error C2146:
>      >      > syntax error : missing ';' before identifier 'pcount'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(40) :
>     error C2501:
>      >      > 'streamsize' : missing storage-class or type specifiers
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(41) :
>     warning C4183:
>      >      > 'pcount': member function definition looks like a ctor,
>     but name
>      >     does
>      >      > not match enclosing class
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(42) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(42) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(45) :
>     error C2629:
>      >      > unexpected 'class std::strstreambuf ('
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(45) :
>     error C2334:
>      >      > unexpected token(s) preceding '{'; skipping apparent
>     function body
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(51) :
>     error C2039:
>      >      > 'seekdir' : is not a member of 'ios'
>      >      >         C:\MSVStudio6\VC98\INCLUDE\ios.h(106) : see
>     declaration
>      >     of 'ios'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(51) :
>     error C2061:
>      >      > syntax error : identifier 'seekdir'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(54) :
>     error C2039:
>      >      > 'openmode' : is not a member of 'ios'
>      >      >         C:\MSVStudio6\VC98\INCLUDE\ios.h(106) : see
>     declaration
>      >     of 'ios'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(54) :
>     error C2061:
>      >      > syntax error : identifier 'openmode'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(56) :
>     error C2061:
>      >      > syntax error : identifier '_Strstate'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(62) :
>     error C2146:
>      >      > syntax error : missing ';' before identifier '_Strmode'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(62) :
>     error C2501:
>      >      > '_Strstate' : missing storage-class or type specifiers
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(62) :
>     error C2501:
>      >      > '_Strmode' : missing storage-class or type specifiers
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(68) :
>     error C2143:
>      >      > syntax error : missing ';' before '<class-head>'
>      >      > C:\MSVStudio6\VC98\INCLUDE\../include/strstream(68) :
>     fatal error
>      >     C1004:
>      >      > unexpected end of file found
>      >      > DICOMParser.cxx
>      >      >
>      >    
>     C:\Toolkits\InsightToolkit\Sources\Utilities\DICOMParser\DICOMHeaderValues.h(6)
>      >
>      >      > : error C2039: 'ostream' : is not a member of 'std'
>      >      >
>      >    
>     C:\Toolkits\InsightToolkit\Sources\Utilities\DICOMParser\DICOMHeaderValues.h(11)
>      >
>      >      > : error C2039: 'ostream' : is not a member of 'std'
>      >      > ...
>      >      > and so on...
>      >
>      >
>      >
>      >
>      >     _______________________________________________
>      >     Insight-users mailing list
>      >     Insight-users at itk . org <mailto:Insight-users at itk . org>
>     <mailto:Insight-users at itk . org>
>      >     http://www . itk . org/mailman/listinfo/insight-users
>      >
> 
> 
> 
> 
>     _______________________________________________
>     Insight-users mailing list
>     Insight-users at itk . org <mailto:Insight-users at itk . org>
>     http://www . itk . org/mailman/listinfo/insight-users
>