Visual Studio 2010 --> 2012 strange things happen

On 09/02/2014 at 15:34, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   13,14,15 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Ok, I am going from VS 2010 to VS 2012. As far as I understand, this is ok with regard to the binaries created, it is first when I want to go to VS 2013 things happen, right?
Well, forget about 2013 at this moment.

I had expected a few hassles and snags, I can live with that. But this, which I will describe below, is more than I can understand, even if I try very hard:

BaseObject* bar FooBar::GetBarFromFoo(BaseTag* foo)
{
    return foo->GetObject();
}

This code works just fine all over my plugin, but not in this very class. All classes I have stem from TagData. If I put the cursor over GetObject(), and press F12, it hops to the definition all right. And Code Completion suggests GetObject() as it should, but Intellisense complains.
I really wonder why this happens!!
What I did, was to create a helper class, with just the purpose to solve this stupid error. With the same code in this helper class. And in this helper class, it works fine, I can build the project. But hey - I want to find out about this, what on earth is going on?!?

Edited:
The problem is gone..
I have no idea why this hapoened, apart from one fact: I tried  the Visual Leak detector http://vld.codeplex.com/
And a lot of things suddenly doesn't work anymore.

On 10/02/2014 at 03:18, xxxxxxxx wrote:

GetObjectA is something from windows.h as far as I can remember.
If you include it make sure that you also uses something like this:

  
#define WIN32_LEAN_AND_MEAN  
#define VC_EXTRALEAN  
#define NOMINMAX  
//other NO... defines...  
    
    
    #include "windows.h"
    

http://support.microsoft.com/kb/166474

If you use R14 SDK then there will be problem with LONG also.

regards,
Remo

On 10/02/2014 at 09:43, xxxxxxxx wrote:

Originally posted by xxxxxxxx

If you use R14 SDK then there will be problem with LONG also.

Yes, I saw that too.

In general, while I have been programming in C++ now for 8 months, I feel I am still a beginner. What confuses me is all those paths, compiler options, linker properties etc. It is like a jungle to me, whenever I build, I fear an error message popping up that I have no clue about.
The Property Manager in Visual Studio is especially confusing, combined with the property settings for each project. I have a wrong path somewhere, correct this path all over in a dialog boxes I can find, compile, get an error, inspect the properties again - only to find that the incorrect path I thought I had weeded out has crept back into the system again.
Well, I am exaggerating a bit, but you get the picture.

Thanks for the reply, great tip!