<div>I have gotten GAlib to build with g++; my exact compiler details are:</div><div><div>i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)</div></div><div><br></div><div>

Out of curiosity I tried to build it with the clang++ compiler :</div><div><div>Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)</div><div>Target: x86_64-apple-darwin11.1.0</div><div>Thread model: posix</div>

</div><div><br></div><div>I have noticed that Clang will issue warnings for things that GCC doesn&#39;t, but I have never seen it fail to compile things that GCC will, since both compilers use the same LLVM backend. However Clang chokes on the file GA1DArrayGenome.C... </div>

<div><br></div><div><div>libtool: compile:  clang++ -DPACKAGE_NAME=\&quot;ga\&quot; -DPACKAGE_TARNAME=\&quot;ga\&quot; -DPACKAGE_VERSION=\&quot;2.4.7\&quot; &quot;-DPACKAGE_STRING=\&quot;ga 2.4.7\&quot;&quot; -DPACKAGE_BUGREPORT=\&quot;<a href="mailto:galib-bugs@mit.edu">galib-bugs@mit.edu</a>\&quot; -DPACKAGE_URL=\&quot;\&quot; -DPACKAGE=\&quot;ga\&quot; -DVERSION=\&quot;2.4.7\&quot; -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\&quot;.libs/\&quot; -DHAVE_LIMITS_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_GETHOSTNAME=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SELECT=1 -DHAVE_SQRT=1 -I. -I.. -g -O2 -MT GAStringGenome.lo -MD -MP -MF .deps/GAStringGenome.Tpo -c GAStringGenome.C  -fno-common -DPIC -o .libs/GAStringGenome.o</div>

<div>In file included from GAStringGenome.C:11:</div><div>In file included from ../ga/GAStringGenome.h:14:</div><div>In file included from ../ga/GA1DArrayGenome.h:178:</div><div>../ga/GA1DArrayGenome.C:225:3: error: use of undeclared identifier &#39;initializer&#39;</div>

<div>  initializer(GA1DArrayAlleleGenome&lt;T&gt;::DEFAULT_1DARRAY_ALLELE_INITIALIZER);</div><div>  ^</div><div>../ga/GA1DArrayGenome.C:226:3: error: use of undeclared identifier &#39;mutator&#39;</div><div>  mutator(GA1DArrayAlleleGenome&lt;T&gt;::DEFAULT_1DARRAY_ALLELE_MUTATOR);</div>

<div>  ^</div><div>../ga/GA1DArrayGenome.C:241:3: error: use of undeclared identifier &#39;initializer&#39;</div><div>  initializer(GA1DArrayAlleleGenome&lt;T&gt;::DEFAULT_1DARRAY_ALLELE_INITIALIZER);</div><div>  ^</div>
<div>
../ga/GA1DArrayGenome.C:242:3: error: use of undeclared identifier &#39;mutator&#39;</div><div>  mutator(GA1DArrayAlleleGenome&lt;T&gt;::DEFAULT_1DARRAY_ALLELE_MUTATOR);</div><div>  ^</div><div>4 errors generated.</div></div>

<div><br></div><div><br></div><div>When I trace back through this using Xcode, it seems that GA1DArrayGenome.C is included in GA1DArrayGenome.h due to the GALIB_USE_BORLAND_INST flag being defined, though this is difficult to corroborated. </div>

<div><br></div><div>The failure to build with the Clang/Clang++ compilers is not something that I consider urgent. However I have noticed that definitions like GALIB_USE_BORLAND_INST are set in the ..ga/gaconfig.h header. </div>

<div><br></div><div>This presents an unfortunate situation. The compiler is essentially sent on a &quot;choose-your-own-adventure&quot; path through the dense logic of preprocessor macros once the gaconfig.h header is loaded. This will only make GAlib more brittle and harder to maintain as compilers and architectures continue to evolve. A potential fix to this situation is to let a true build configuration system (like CMake or Autotools) generate the gaconfig.h header without all of the #if defined(__COMPILERX__) styled logic gates. </div>

<div><br></div><div>If there is sufficient community interest, I would be willing to submit a prototype. </div><div><br></div><div>Jerry</div><div><br></div><div><br></div>