[Dcmlib] gcc

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Jul 19 15:54:37 CEST 2005


> Voici en premier les header que j utilise dans le fichier et le début d erreur à la compilation:
> 
> #include \"gdcmFile.h\"
> #include \"gdcmFileHelper.h\"
> #include \"gdcmDocument.h\"
> #include \"gdcmValEntry.h\" 
> #include \"gdcmBinEntry.h\"
> #include \"gdcmDebug.h\"
> #include <stdio.h>

grrrrr, stdio.h ....

> #include <string.h>

what is this thing ? Are you sure you don't want <string> instead ?

> #include <fstream.h>

-> <fstream>

> #include <math.h>
> 
> #ifndef _WIN32
> #include <unistd.h> //for access, unlink
> #else
> #include <io.h> //for _access
> #endif

hum you should not have to do this fancy shawncy

> In file included from /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../../../include/c++/3.4.1/backward/fstream.h:31,
>                  from /home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx:26:
> /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../../../include/c++/3.4.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.

this one you don't care

/home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx: In function `void drawline(int, int, int, int, int, int, uint8_t*, int, int, int)':
> /home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx:39: error: `max' undeclared (first use this function)


you need to define a function before using it. Only ugly C code do not...

/home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx:168: error: `string' was not declared in this scope

gdcm never open std namespace, tons of reason why. You have to use std::string.

 /home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx:199: error: `line' undeclared (first use this function)

I bet line was a std::string

/home/olivier/Tfe/GDCM/gdcmBin/bin/Tfe/Recalage/exGrey2RGB.cxx:201: error: `string' has not been declared


HTH
Mathieu
-------------- next part --------------
_______________________________________________
Dcmlib mailing list
Dcmlib at creatis.insa-lyon.fr
http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib


More information about the Dcmlib mailing list