[Insight-developers] expat

Kent Williams norman-k-williams at uiowa . edu
Fri, 25 Jul 2003 10:56:03 -0500


On Friday 25 July 2003 10:17 am, Miller, James V (Research) wrote:
> In the expat sources in Utilities/expat there are references to
> vtkexpat_EXPORTS and vtkNotUsed.
> The latter is fairly easy to fix.  What
> should the former be?  The library that is built is ITKEXPAT.  Should t=
he
> symbol by ITKEXPAT_EXPORTS?

vtkexpat_EXPORTS just defines whether, on WIN32 platforms, you're importi=
ng=20
(i.e. a client of the DLL) or exporting (building the library) public=20
symbols.  My guess is that this should be changed to whatever symbol has =
this=20
function in ITK.

>
> Along this line, if you turn on BUILD_SHARED_LIBS for ITK (which is nee=
ded
> for wrapping), why doesn't expat, zlib, png, etc. build a dll?
>

Well in the case of expat, it's because it hasn't been set up for a share=
d=20
library build on non-win32 platforms. Don't know about those other librar=
ies.

And the reason VTK symbols are in the expat library is because I copied i=
t=20
over from VTK in order to use it.  I didn't parse through all the code=20
looking for VTK-isms.  Ideally expat should be one module used both place=
s=20
instead of being copied, similar to the setup for SystemTools.

A further refinement might be to NOT build expat at all when it's availab=
le=20
already.  The reason I broke everyone's builds yesterday (one reason anyw=
ay)=20
is that I didn't realize that Redhat has expat installed in /usr/include =
and=20
/usr/lib already, so I was getting include files from /usr/include instea=
d of=20
ITK.   A FindITK.cmake file would probably be the proper solution, such t=
hat=20
the Insight/Utillities CMakeLists.txt would only trigger building and=20
installing expat if it's not already available on the build computer.

Redhat ships with ITK shared object libraries, by the way, so it is possi=
ble=20
to build them on non-Win32 platforms.=20