[Insight-users] rPoly.c : an OS X dynamic library issue after vxl update in ITK 1.6.0

hui zhang huiz at gradient.cis.upenn.edu
Fri, 30 Jan 2004 05:17:55 -0500


rPoly.c was updated as part of vxl 2003-12-15 update.  On the line 13, 
the new version dropped the "static" keyword to the common block struct 
defintion.  now it will fail to produce a shared library of itknetlib, 
with the following error:

ld: common symbols not allowed with MH_DYLIB output format with the 
-multi_module option
rpoly.o definition of common _global_ (size 4232)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Volumes/swap/tmp/huiz/ITKBuild/bin/libitknetlib.dylib] 
Error 1

The error disappears if restoring the "static" keyword.  alternatively, 
you can add -single_module option to the shared library command.