Thursday, August 25, 2005, 12:00 AM - Programming
Problem:
Intellisense doesn't work with boost::shared_ptr. I am using boost version 1.32.
Longer description:
Here is a code sample:
class foo
{
public:
bool func() { return true; };
};
boost::shared_ptr<foo> pfoo;
pfoo.get();
pfoo->func();
No intellisense pops up after the . or the ->. I love shared_ptr, but having no intellisense makes things really annoying.
Cause:
I think it's because VS.Net does not look at the appropriate header files. It probably could do a better job and maybe it does in VS 2005, but then again, perhaps it would slow it down to try to parse through many more files?
As a side note, I tried Visual Assist and it sort of worked, but sometimes it actually popped up the wrong intellisense, whoops! Also, I did notice that it had to parse through a lot of files.
Fix:
At first glance, you would think that adding boost\shared_ptr.hpp to the project (add exiting item) would solve the program. It ALMOST does, but you need to add that file AND boost/detail/shared_ptr_nmt.hpp. At least, that is what I have to do with boost 1.32 to get it to work.
Hope it works for you too!
[ add comment ] | permalink |




( 3 / 113 )Tuesday, June 7, 2005, 12:00 AM - Programming
NUnit rocks! 'Nuff said.[ add comment ] | permalink |




( 2.9 / 119 )Saturday, March 19, 2005, 12:00 AM - Programming
Problem:
I get this error message: "Duplicate declaration of member 'location'"
Longer description:
When I try to pull up a form in design view, all the controls show up in the top-left corner of the form, and the error message appears in the task list. The form itself is not all that complicated.
Cause:
Beats me, but I read somewhere something about a race condition with compiling versus bringing up the form. Also, I found a hotfix from Microsoft, but it looks like it is only for when the error occurs when you are opening a solution. Also, it says it is for Japanese version only... Well, that doesn't help me...
Fix:
I fixed the problem by deleting all the intermediate files (.dll and other binaries) and restarting visual studio. Good luck.
Additional Notes:
(2005-Apr-28):
At least one other person who received this problem was not able to solve it by simply deleting all the .dll files. They were using source control, and after a clean checkout, things worked fine. This leads me to believe that possibly the .csproj.user and/or .suo files are also partly to blame. That's also what the microsoft workaround would seem to suggest.
[ 1 comment ] ( 538 views ) | permalink |




( 3 / 142 )Back





