X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=DEVELOPPER;h=37af3d44ff705aba8fcbae223ecf9599344bb49b;hb=89763e8094465640a31f98815a3448e1e7d6ff3f;hp=bf187931a57fc19b37257864ee6962fc294d9777;hpb=79e3b71a4bdf953490ad8e294f1148ac6e64f3d7;p=gdcm.git diff --git a/DEVELOPPER b/DEVELOPPER index bf187931..37af3d44 100644 --- a/DEVELOPPER +++ b/DEVELOPPER @@ -1,5 +1,5 @@ The following comments are intended for core gdcm developpers. - + * Compiling gdcm: - Checkout the sources to an arbitrary directory noted GDCM (e.g. ~/cvs/gdcm). - Checkout the test images to an arbitrary directory noted GDCMDATA @@ -20,6 +20,11 @@ The following comments are intended for core gdcm developpers. -- GDCM_VTK When this option is on VTK_DIR might require manual configuration -- GDCM_WRAP_PYTHON + -- CMAKE_CXX_FLAGS (when working with gcc of course) should be set to + -g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter + -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated + -Woverloaded-virtual + (this is to avoid spurious problems with overloading) * Configure cmake: hit c * Generate the makefiles (or dsw): hit g - Compile gdcm @@ -343,12 +348,23 @@ gdcm coding style and religious/agnostic beliefs (proposition) typedef Header* HeaderPointer; HeaderPointer MyHeaderPointer; - One notorious counter example for non using C style inclusion concerns - exact-width intergers (since there seem to be no equivalent for C++). + exact-width integers (since there seem to be no equivalent for C++). When using exact-width integers use the typedef names defined by the Basic ISO C99: 7.18 Integer types i.e. int8_t int16_t int32_t int64_t (signed integers) and uint8_t uint16_t uint32_t uint64_t (unsigned integers). + Conversion table is then: + unsigned char -> uint8_t; + unsigned short -> uint16_t; + unsigned int -> uint32_t; + unsigned long -> uint32_t; + unsigned long long -> uint64_t; + (signed) char -> int8_t; + short -> int16_t; + int -> int32_t; + long -> int32_t; + long long -> int64_t; Hence do not use declarations like "unsigned int". With g++, accessing those typedef is achieved by the following #include @@ -363,3 +379,7 @@ CVS policy * you can start a single test through ctest with ctest -R FailingTestName -V >& log ------------------------------------------------ +Compiler flags policy: + When working with gcc please use the flags specified in DEVELOPPER file + (in order to avoid difficult overloading problems). +------------------------------------------------