VS2013 - editor failing to resolve symbols


See those annoying red-underscores!

I'm choosing to not copy modules locally, as (apart from anything else) some of the modules are mine and I want to edit the originals. 

I'm sure this has come up before, but I can't find the discussion.  

Does anyone know how to persuade Visual Studio 2013 to resolve symbols properly in JUCE module source files? 

This type of thing comes up every few months.

It’s Intellisense not picking things up right because of juce’s design (unity build modules).

Best ignored or disable intellisense’s real time warning/error reporting.

I've got a bunch of (also unity build) modules of my own.  It's pretty damn annoying.  I'm going to see if VS2015 works any better... 

I wonder if there's any way of persuading it to work.  It has the primary .cpp file in the project, so I'm buggered if I know why it refuses to follow the include structure and work this all out... 

Iirc, VS2015 is a tad better, but not by much…

If you find a way to coax any recent VS versions’ Intellisense to play nice - you’ll definitely have to share!

Ok - so observations on a new project loaded in VS2013. 

  • Classes start out with red-errors. 
  • Peeking at the definition resolves most errors in VS2013 for a specific symbol. 
  • Setting the files to copy locally, or not, fails to resolve the problem. 

If I build a simple unity build project from scratch in VS2013 I don't seem to be able to recreate the problem. 

I solved this problem in the Introjucer by providing an absolute path for JUCE modules. Apparently Intellisense in VS2013 doesn't like relative paths

Well, that's an avenue to explore...


But doesnt' appear to solve the problem for me :/

I've reported it to Microsoft ... not expecting a quick fix mind you, so if anyone has any other ideas for a workaround, I'm all ears (metaphorically). 

Did you try also to remove the intellisense database in your project folder, to see if VS2013 recreates it properly ? I remember I did this a few times on VS2008... And do you have the update 5 of VS2013 ?

I'll try it shortly, though it's a brand new test project, and i have the same problem with VS2015. 


Kinda ... 

Put using namespace ::juce at the top of the file and it all works fine ... I presume there's no bad side effect of duplicating the using namespace stuff? 

Unfortunately there is a bad side effect - VS2015 throws a warning "juce namespace is using itself".

2013 seems cool with it.  And it'll probably fix the issue with CLion as well which hates includes inside namespaces.

I'll have an experiment with 2015 at some point and see if there's some way of getting the warning to go away.  Though a warning like that seems better than red-ink all over everythign like it's broken :)

Okay -

I reported this problem to both JetBrains (Resharper C++) and Microsoft. 

JetBrains have now replied to say it's more or less (their words) fixed! And I've just done a quick check and it looks good. So if you're using Visual Studio and JUCE I'd highly recommend trying the demo of Resharper C++ v1.1 and seeing if it works for you. 

Microsoft are yet to say anything.