<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br></div>Bill,<br><br>I think the default build type for MinGW is set to debug, so, that could explain it.<br><blockquote><br><br>Ali,<br><br>As Luis said, there is very little code in the shared libraries. Most of the code is templated and does not appear in those libraries.<br><br>Are you building with debug? Jim and I did a study a while back, comparing the sizes of executables with debug/optimization/static/shared combinations. I can't find my notes on this. I recall that with debug turned on, the executables were 3-10 times larger.
<br><br>Bill<br><br><div class="EC_gmail_quote">On Nov 10, 2007 10:48 AM, Ali - <<a href="mailto:saveez@hotmail.com">saveez@hotmail.com</a>> wrote:<br><blockquote class="EC_gmail_quote" style="padding-left: 1ex;">
<div><div style="text-align: left;">Luis,<br><br>I remember trying to compile the demons registration example under MinGW and static-linking it to ITK - I think the exe file was something about 4 MB or so. Regardless of everything else, just think of the process in this way: the linker has to 'generate' a big binary file for static linking (a few MB) comparing to the shared linking version (of the order of
0.1 MB). This binary 'generation' is a slow one which you may not feel when compiling the shared-lib ITK once and linking against it many times. But it becomes a pain when you have to static-link your exe many times.
<br><br>I did not do any profiling on this, but try the demons registration example, qualitatively, it felt like the linking time linearly increased with the output binary size.<br><br></div><div><div></div><div class="EC_Wj3C7c">
> <br>> <br>> Hi Ali,<br>> <br>> > <br>> > Even if there were no eroors, ITK under MinGW is not really useful<br>> > right now, ITK is a big template-basd library and static-linking it<br>> > to your binary will be a slow-long process.
<br>> <br>> <br>> <br>> I'm not quite sure the statement above makes sense.<br>> <br>> <br>> 1) Yes, ITK is an almost fully templated library<br>> <br>> 2) Whether you build it as shared or static library,
<br>> a very small fraction of the code goes into that library<br>> <br>> 3) Most of the code of ITK is actually compiled when you<br>> compile your application, not when you build ITK.<br>> <br>>
<br>> The difference between using static or shared when building<br>> ITK libraries, make that the linking time of your application<br>> will change by a small fraction. Linking is in itself a small<br>> fraction of the build time compared to compilation itself.
<br>> <br>> <br>> <br>> Regards,<br>> <br>> <br>> Luis<br>> <br>> <br>> <br>> --------------<br>> Ali - wrote:<br>> > Thomas,<br>> > <br>> > ITK could be compiled on MinGW only as a static library -- when the
<br>> > shared-lib flag was on there were linking errors. There were attempts to <br>> > solve these issue just before the 3.4 release, but it didn't get <br>> > anywhere. The errors that you reported could be some side effects of
<br>> > those attempts.<br>> > <br>> > Even if there were no eroors, ITK under MinGW is not really useful right <br>> > now, ITK is a big template-basd library and static-linking it to your <br>> > binary will be a slow-long process.
<br>> > <br>> > <br>> > Hi ITK users<br>> > <br>> > Between ITK v 3.2.0 and v 3.4.0, the file<br>> > ITK/Utilities/itkjpeg/jconfig.h.in had been modified in the line 24.<br>> > In
3.2.0 version the line was :<br>> > #if defined (_WIN32) && !(defined(__CYGWIN__) ||<br>> > defined(__MINGW32__))<br>> > In 3.4.0 version the line is :<br>> > #if defined (_WIN32) && !defined(__CYGWIN__)
<br>> > <br>> > On my MinGW platform, the ITK 3.2.0 compiling with success.<br>> > But the new version 3.4.0 generate this compiling error :<br>> > [ 5%] Building C object<br>> > Utilities/itktiff/CMakeFiles/itktiff.dir/tif_jpeg.obj
<br>> > In file included from<br>> > G:/OTB-DART-NIGHTLY/sources/InsightToolkit-3.4.0/Utilities/itktiff/tif_jpeg.c:74: <br>> > <br>> > G:/OTB-DART-NIGHTLY/nightly/mingw/outils/binaries/static/debug/itk-
3.4.0-MinGW/Utilities/itkjpeg/8/jpeglib.h:99: <br>> > <br>> > parse error before "boolean"<br>> > G:/OTB-DART-NIGHTLY/nightly/mingw/outils/binaries/static/debug/itk-3.4.0-MinGW/Utilities/itkjpeg/8/jpeglib.h:115:
<br>> > <br>> > parse error before "boolean"<br>> > G:/OTB-DART-NIGHTLY/nightly/mingw/outils/binaries/static/debug/itk-3.4.0-MinGW/Utilities/itkjpeg/8/jpeglib.h:167: <br>> > <br>> > parse error before "boolean"
<br>> > G:/OTB-DART-NIGHTLY/nightly/mingw/outils/binaries/static/debug/itk-3.4.0-MinGW/Utilities/itkjpeg/8/jpeglib.h:182: <br>> > <br>> > parse error before '*' token<br>> > :<br>> > :
<br>> > (with CMake v 2.4.6)<br>> > <br>> > Could you help me, How can I solve my problem ?<br>> > <br>> > Thanks,<br>> > Thomas<br>> > <br>> > ------------------------------------------------------------------------
<br>> > Are you the Quizmaster? Play BrainBattle with a friend now! <br>> > <<a href="http://specials.uk.msn.com/brainbattle" target="_blank">http://specials.uk.msn.com/brainbattle</a>><br>> > <br>
> > <br>> > ------------------------------------------------------------------------<br>> > <br>> > _______________________________________________<br>> > Insight-users mailing list<br>> >
<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
<br><br><hr></div></div>Get free emoticon packs and customisation from Windows Live. <a href="http://www.pimpmylive.co.uk" target="_blank">Pimp My Live!</a></div>
<br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br><br></blockquote></div><br>
</blockquote><br /><hr />The next generation of MSN Hotmail has arrived - <a href='http://www.newhotmail.co.uk' target='_new'>Windows Live Hotmail</a></body>
</html>