Support for Visual Studio 2005

Paul Harris paulharris at computer.org
Fri Nov 14 00:42:28 UTC 2008


Thanks, I've added a test for it in my bugfixes branch and added it to the
bug tracker.

2008/11/13 Antibyte Scoopex <antibyte at gmail.com>

> Hi Paul,
>
> I have cast from size_t to int (instead of unsigned int) whereever to
> compiler told me to. I don't know if this makes any different impact on
> libkdtree than casting all to unsigned.
>
> An other issue I found using test_kdtree.cpp is this:
> When I run it in release mode the first line of output is:
> meta node:   0x00335ec0 (0,0,0); parent: 0000000000; ...
>
> However in debug mode I get:
> meta node:   0x00336c08 (-842150451,-842150451,-842150451); parent:
> 0000000000; ...
>
> -842150451 = 0xcdcdcdcd which is used by Microsoft's C++ debugging runtime
> library to mark uninitialised heap memory. The rest of the output is
> identical. While uninitialized data might not be a problem for libkdtree
> itself, I can see the possiblity of using libkdtree in an erranous manner
> and then have release and debug builds that do not correspond to each other.
> Just a thought.
>
> I'm starting to get into using libkdtree, and greatly support Sam Haynes
> proposal for a minimanual for beginners. :)
>
> Best regards,
> Antti.
>
>
> 2008/11/13 Paul Harris <harris.pc at gmail.com>
>
> i turned on the "detect 64 bit problems" and saw the errors!
>>
>> I've converted them all to unsigned ints.  i'm not sure if that was the
>> right thing to do, i'll ask around about it.
>>
>> static casts are good, except they dont detect errors like converting -1
>> to an unsigned int.  check out boost::numeric_cast for that
>>
>> keep going with C++, i love it more than other languages as it helps you
>> find more bugs without even running the program...
>>
>>
>> 2008/11/13 Paul Harris <paulharris at computer.org>
>>
>>> I didn't see those warnings, what compiler flags are you using?
>>> Can you please send me your adjusted kdtree files?
>>>
>>> thanks,
>>> Paul
>>>
>>> 2008/11/13 Antibyte Scoopex <antibyte at gmail.com>
>>>
>>> Hello Paul,
>>>>
>>>> thank you very much for your help!
>>>>
>>>> You fixed all the errors. The examples/test_kdtree.cpp seems to work as
>>>> intended.
>>>>
>>>> Using Visual Studio 2005 there are only some warnings left, all of them
>>>> about implicitly converting 'size_t' to 'int'/'unsigned int'.
>>>>
>>>> I fixed those with static_casts and it compiles totally clean now. I
>>>> hope I didn't break anything by that, because these STL-like templates
>>>> intimidate me a bit. :)
>>>>
>>>> Thanks again!
>>>> Best regards,
>>>> Antti.
>>>>
>>>>
>>>>
>>>> 2008/11/13 Paul Harris <paulharris at computer.org>
>>>>
>>>>> Hi again,
>>>>>
>>>>> Could you please tell me if this fixes all of your compiler errors...
>>>>> and if not please send me the compile output.
>>>>>
>>>>> Please confirm receipt, sometimes zip files get stuck in spam
>>>>> filters...
>>>>>
>>>>> thanks,
>>>>> Paul
>>>>>
>>>>>
>>>>> 2008/11/13 Paul Harris <paulharris at computer.org>
>>>>>
>>>>> Hi Antibyte (love the name),
>>>>>>
>>>>>> Thats on the hit-list to fix, could you please send the output, it may
>>>>>> come in handy :)
>>>>>>
>>>>>> thanks,
>>>>>> Paul
>>>>>>
>>>>>> 2008/11/12 Antibyte Scoopex <antibyte at gmail.com>
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I would really like to use libkdtree++, however I am too dumb to
>>>>>>> compile it under Visual Studio 2005 w/ SP1.
>>>>>>> It throws numerous warnings and errors. If you want I can send the
>>>>>>> output.
>>>>>>>
>>>>>>> Help would be appreciated.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Antti.
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> libkdtree-devel mailing list
>>>>>>> libkdtree-devel at lists.alioth.debian.org
>>>>>>> http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20081114/5e2dfbec/attachment-0001.htm 


More information about the libkdtree-devel mailing list