I agree.  thats why we fixed it, maybe not all of it, but I compile with VS2005 now.  did you try the 0.7 release?<br><a href="http://libkdtree.alioth.debian.org/">http://libkdtree.alioth.debian.org/</a><br><br><div class="gmail_quote">

2009/5/5 Lindley M French <span dir="ltr">&lt;<a href="mailto:lfrench1@gmu.edu">lfrench1@gmu.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Shortly after sending this I encountered the problem: __out is a macro defined in some header or other. I replaced all instances of it with it__out and now it builds. (Still lots of warnings, but Boost has some of those too....choosing not to care.)<br>


<br>
I would suggest that modeling the code after the naming scheme of the standard library was, in this case, a very bad idea. There&#39;s a reason why names starting with _ and __ are considered &quot;reserved&quot;....<br>


<div><div></div><div class="h5"><br>
----- Original Message -----<br>
From: Lindley M French &lt;<a href="mailto:lfrench1@gmu.edu">lfrench1@gmu.edu</a>&gt;<br>
Date: Monday, May 4, 2009 6:54 pm<br>
Subject: Compiling in VS2005 and XCode<br>
<br>
&gt; I have libkdtree++ 0.6.2. I&#39;ve been using it for a graduate class<br>
&gt; project, and it&#39;s offered a large speed improvement over the<br>
&gt; search methods I tried on my own.<br>
&gt;<br>
&gt; I had difficulty getting it to build both on XCode (at home) and<br>
&gt; Visual Studio 2005 (school). On XCode I got it working following a<br>
&gt; suggestion I found online to comment as the following:<br>
&gt; typedef _Node/*&lt;_Val&gt;*/* _Link_type;<br>
&gt; typedef _Node/*&lt;_Val&gt;*/ const* _Link_const_type;<br>
&gt; It now builds cleanly on XCode.<br>
&gt;<br>
&gt; However, VS still isn&#39;t working. The errors I&#39;m getting seem to be<br>
&gt; related to find_within_range:<br>
&gt; kdtree.hpp(374) : error C2561:<br>
&gt; &#39;KDTree::KDTree&lt;__K,_Val,_Acc&gt;::find_within_range&#39; : function must<br>
&gt; return a value<br>
&gt; kdtree.hpp(376) : error C2059: syntax error : &#39;)&#39;<br>
&gt;<br>
&gt; Now, since this is a template, it&#39;s possible the issue is related<br>
&gt; to my usage of the function, so that&#39;s here:<br>
&gt; kdtree.find_within_range(-1, maxdist,<br>
&gt; std::back_inserter(indexes_out));<br>
&gt; Rather than storing actual values within the KDTree, I&#39;m simply<br>
&gt; storing indexes which are interpreted by the bracket-lookup class.<br>
&gt; -1 is a special index representing the current query point.<br>
&gt; indexes_out is thus a std::vector&lt;int&gt;, and the KDTree itself is<br>
&gt; declared as KDTree::KDTree&lt;3, int, DimIndex&gt; where DimIndex is my<br>
&gt; index-to-feature functor.<br>
&gt;<br>
&gt; Any quick-fix for this issue available? I&#39;ll note again that the<br>
&gt; above all compiles cleanly in XCode, so it&#39;s probably not an<br>
&gt; egregious error but some minor bit of syntax somewhere that VS is<br>
&gt; choking on.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; libkdtree-devel mailing list<br>
&gt; <a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
&gt; <a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
&gt;<br>
<br>
_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
</div></div></blockquote></div><br>