That is probably the cleanest. I do not have access to a MS compiler though. And I'm on the west coast for the month.<div><br></div><div>Maybe Hans and Kent can try it since it is there code?</div><div><br></div><div>Bill<br>
<br><div class="gmail_quote">On Mon, Mar 18, 2013 at 7:31 AM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">So... You think we should add a try compile to check for this bug and define "ITK_EXPLICIT_SPECIALIZATION_REQUIRES_EXPORT" appropriately?<div><br></div><div>Brad</div><div><div class="h5">
<div><br><div><div>On Mar 18, 2013, at 10:20 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:</div><br><blockquote type="cite">I think your solution is OK.<div>
<br></div><div>Looks like this is due to a MS compiler error:<div><a href="http://connect.microsoft.com/VisualStudio/feedback/details/753981" target="_blank">http://connect.microsoft.com/VisualStudio/feedback/details/753981</a></div>
<div><br></div><div><br><br><div class="gmail_quote">On Mon, Mar 18, 2013 at 6:28 AM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Bill,<div><br></div><div>
It looks like my solution was less correct :(</div><div><br>
</div><div>As we are getting a bunch of compilation error on windows now:</div><div><br></div><div><a href="http://open.cdash.org/viewBuildError.php?buildid=2848943" target="_blank">http://open.cdash.org/viewBuildError.php?buildid=2848943</a></div>
<div><br></div><div>What concerned me about your approach was that is blanketly just changes the export specification for all unspecified methods and classes. So it likely will have un intended consequences sooner or later.</div>
<div><br></div><div>Perhaps we should just add some "ifdef GCC"s around the statements I added? Better yet define "ITK_EXPLICIT_SPECIALIZATION_REQUIRES_EXPORT" in the config...</div><div><br></div><div>
Brad</div><div><div><div><br></div><div><br><div><div>On Mar 16, 2013, at 10:39 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>> wrote:</div><br><blockquote type="cite">
<div style="word-wrap:break-word">Bill,<div><br></div><div>Looks like you caught a major issue right before the dashboard did :) You have impeccable timing!</div><div><br></div><div>I looked at this. And it is just a case of a missing ITKCommon_Export. It's just a little tricky because you have the non-specilized declaration and definition. Then a specialized declaration. What's missing is a statement which says the method has been explicitly instantiated (this just happens to be a totally specialized version), but the statement is that same as if it'd been explicitly instantiated. This has been compiler dependent, and we use the ITKCommon_EXPORT macro for that. It's sounds like the extern keyword should to this in C++0x, but I hadn't looked at the closely.</div>
<div><br></div><div>I hope this help explains what's going on....</div><div><br></div><div>Brad</div><div><br></div><div><br><div><div>On Mar 15, 2013, at 10:31 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:</div>
<br><blockquote type="cite">There are issues with template specializations and -fvisibility=hidden. From what I read no current compilers officially support this, but most do. I guess my gcc on the MAXC does not.<div><br>
</div><div>I'll put a patch to gerrit that adds lines like these in Common/src/CMakeLists.txt</div>
<div><div> if(APPLE)</div><div> set_source_files_properties( itkArrayOutputSpecialization.cxx PROPERTIES</div><div> COMPILE_FLAGS -fvisibility=default )</div><div> endif()</div><div><br></div><div>When I do this, my gcc build is OK.</div>
<div><br></div><div>Bill</div><br><div class="gmail_quote">On Fri, Mar 15, 2013 at 7:00 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It has to do with symbol visibility. If I do nm on the ITKCommon lib, the undefined symbols have "t" and not "T". "t" means the symbols are local. If I remove the -fvisiibility=hidden flag from ITKCommon's CMakeLists.txt file, the tests build fine.<div>
<div><div>
<br></div><div><br><br><div class="gmail_quote">On Fri, Mar 15, 2013 at 6:49 PM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Bill,<div><br></div><div>Are you able to compile the release? Or is it a change since then?</div>
<div><br></div><div>Brad</div><div><br><div><div><div>On Mar 15, 2013, at 7:36 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:</div><br>
</div><blockquote type="cite"><div>I see why those statements are there.<div><br></div><div>Still need help.<br><br><div class="gmail_quote">On Fri, Mar 15, 2013 at 4:25 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">More info. If I remove<div><div>template<> std::ostream & operator<< <double> (std::ostream & os, const Array< double > & arr);</div>
<div>template<> std::ostream & operator<< <float> (std::ostream & os, const Array< float > & arr);</div>
<div><br></div><div>Both my c++ and clang build fine.</div><div><br></div><div>What is the purpose of these lines?</div><span><font color="#888888"><div><br></div><div>Bill</div></font></span><div>
<br><div class="gmail_quote">On Fri, Mar 15, 2013 at 4:09 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Guys,<div><br></div><div>This is on my Mac using:</div><div>c++ --version</div><div><div>c++ --version</div><div>i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)</div>
</div>
<div><br></div><div>My clang version builds fine.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Bill</div><div><div><br><br><div class="gmail_quote">On Fri, Mar 15, 2013 at 11:52 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Folks,<div><br></div><div>It's been a few days since itk and tried a build.</div><div><br></div><div>Today I get Linking CXX executable ../../../../bin/ITKCommon1TestDriver<div>
Undefined symbols for architecture x86_64:</div>
<div> "std::basic_ostream<char, std::char_traits<char> >& itk::operator<< <float>(std::basic_ostream<char, std::char_traits<char> >&, itk::Array<float> const&)", referenced from:</div>
<div> void CheckVariableLengthArrayTraits<itk::Array<float> >(itk::Array<float>)in itkNumericTraitsTest.cxx.o</div><div> itkArrayTest(int, char**)in itkArrayTest.cxx.o</div><div> "std::basic_ostream<char, std::char_traits<char> >& itk::operator<< <double>(std::basic_ostream<char, std::char_traits<char> >&, itk::Array<double> const&)", referenced from:</div>
<div> void CheckVariableLengthArrayTraits<itk::Array<double> >(itk::Array<double>)in itkNumericTraitsTest.cxx.o</div><div>ld: symbol(s) not found for architecture x86_64</div><div>collect2: ld returned 1 exit status</div>
<div>make[2]: *** [bin/ITKCommon1TestDriver] Error 1</div><div>make[1]: *** [Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/all] Error 2</div><div>make: *** [all] Error 2</div><span><font color="#888888"><div>
<br></div><div>Bill</div><div>
<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div><span><font color="#888888">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></div><div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</blockquote></div><br></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>