[Insight-users] Compile problems - Red Hat Enterprise WS-3; cmake 2.0.2 ; ITK from CVS ; DICOM parser subdirectory

Atwood, Robert C r.atwood at imperial.ac.uk
Fri Jul 2 10:56:38 EDT 2004


Original message attatchemnts were too big for the list, here are just
the initial make output and only the cvs tags for the entries related to
DICOM 



-----Original Message-----
From: Atwood, Robert C 
Sent: 02 July 2004 14:48
To: 'Luis Ibanez'
Cc: ITK Users (E-Mail)
Subject: RE: [Insight-users] Compile problems - Red Hat Enterprise WS-3;
cmake 2.0.2 ; ITK from CVS ; DICOM parser subdirectory


Example error message: 

Building object file DICOMFile.o...
In file included from
/sources/local/ITK_cvs/Utilities/DICOMParser/DICOMFile.cxx:29:
/sources/local/ITK_cvs/Utilities/DICOMParser/DICOMFile.h:51: error:
parse error
   before `&' token

(several more like this)



OKAY! OKAY! I am beginning to hate C++ already. Give me plain C! 

>You should *NEVER* use "using namespace std;"
I said it 'might' be solved this way... not that it 'should' be solved
this way :-). 

sh-2.05b# grep -r 'using namespace std' *
Code/Algorithms/itkGradientDifferenceImageToImageMetric.txx:using
namespace std;
Code/Common/itkWindowedSincInterpolateImageFunction.txx:using namespace
std; ... Someone uses this method...



The version of ITK, as I mentioned in the subject, was checked out via
anonymous CVS. This was originally done yesterday (July 1 2004) CVS
status results attatched for more detail. This was created with

cvs upd -C 
cvs status > itk_version.txt 

(so the examples are with TODAY's cvs July 2 2004 but there is no change
in the results)

I had some other problems to do with updating the previous checkout and
recompiling, I am not yet sure if it is a cmake issue or just me doing
something incorrect. However, ignoring this, I just checked out a whole
fresh tree which I called ITK_cvs, and created a fresh new build
directory which I called ITK_build

I used:

 
cd ITK_build
ccmake ../ITK_cvs

 BUILD_EXAMPLES                   ON
 BUILD_SHARED_LIBS                ON
 BUILD_TESTING                    ON
 CMAKE_BACKWARDS_COMPATIBILITY    2.0
 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /usr/local/encap/ITK-1.8.0.4

[c]
[g]
make >& make_output.txt
make clean
make -k >make_k_output.txt

(-k to 'keep going' after the error, to find more errors


These files, itk_version.txt, make_output.txt, and make_k_output.txt are
attatched and contain all the error messages Here is the first one,
there are many more.



Building object file DICOMFile.o...
In file included from
/sources/local/ITK_cvs/Utilities/DICOMParser/DICOMFile.cxx:29:
/sources/local/ITK_cvs/Utilities/DICOMParser/DICOMFile.h:51: error:
parse error
   before `&' token


The ccmake problem is that the process did not seem to honour a new
CMAKE_INSTALL_PREFIX set via ccmake, for an updated version; ie

ccmake 
...
CMAKE_INSTALL_PREFIX             /usr/local/encap/ITK-1.8.0.4
...
[c]
[g]
make 
make install

just installed into the last prefix I had set a while ago
(/usr/local/encap/ITK-1.8.0.2) Fortunately I still have the base
ITK-1.8.0  (I use 1.8 for cvs checkouts of the head revision that are
later than the 1.6, and .0.n for each time I check out from CVS and
recompile and install but this may not be consistent with your usage,
please see the itk_version.txt file for the cvs revision numbers of
specific files)   

Now I cannot tell if ccmake 2.0.2 does this or not because I have not
managed a successful build of ITK after upgrading the ccmake
 

Robert



-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: 01 July 2004 21:25
To: Atwood, Robert C
Cc: ITK Users (E-Mail)
Subject: Re: [Insight-users] Compile problems - Red Hat Enterprise WS-3;
cmake 2.0.2 ; ITK from CVS ; DICOM parser subdirectory




Hi Robert,

Please *NEVER* open namespaces !

That defeats the purpose of using namespaces.

You should *NEVER* use

         "using namespace std;"

or

         "using namespace itk;"


Please post the errors messages that you are getting.

If the compiler is complainng about "string", the real
solution is to specify its namespace like

                   std::string


instead of opening the namespace and exposing all the
symbols

In what version of ITK are you encountering this problem ?


Please let us know.


    Thanks


      Luis



-----------------------
Atwood, Robert C wrote:

> Dear ITK folks
> 
> I get several messages due to the compiler not recognizing the
> 'string' macro/datatype/whatever it is; this might be solved by 
> putting
> 
> using namespace std;
> 
> into the top of several files in the Utilities/DICOMParser .
> 
> 
> Here are some details (I tried  using ccmake 1.8 first, then upgraded
> to see if that was the problem)
> 
> sh-2.05b# ccmake --version
> ccmake version 2.0.2
> 
> sh-2.05b# rpm -q glibc
> glibc-2.3.2-95.20
> 
> sh-2.05b# rpm -q gcc
> gcc-3.2.3-24
> 
> 
> I seem to recall having this problem before, but I cannot remember if
> it was with this (ITK) or some other software package..I think it also

> has something to do with the level of gcc or glibc ?
> 
> Robert
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: make_output.txt.gz
Type: application/x-gzip
Size: 1215 bytes
Desc: make_output.txt.gz
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040702/f9a21f94/make_output.txt.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itk_dicom_version.txt.gz
Type: application/x-gzip
Size: 502 bytes
Desc: itk_dicom_version.txt.gz
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040702/f9a21f94/itk_dicom_version.txt.bin


More information about the Insight-users mailing list