Visual Studio 2013 Express - Missing .H Header Files [Solved]


#1

Hi,

I'm using the Introjucer with Windows 7 + Visual Studio 2013 Express for Desktop. After creating a non-GUI project where I don't copy all the JUCE files, I am unable to compile the program:

Error 1 error C1083: Cannot open include file: '../../../../../juce/juce_audio_basics/juce_audio_basics.h': No such file or directory (..\..\Source\Main.cpp)

I'm sure that it had 'modules' in the path (juce/modules) when I created it in Introjucer. I can correct it by re-generating the project files, after making sure 'modules' is appended to 'juce' in the path. It's not hard to correct but I've seen it twice, now and both times, I believe the path was originally set correctly in Introjucer.


#2

Under the module settings (not the general include paths), you need to make sure you set the correct path for each module.


#3

Ah, I see what the problem is. The default target (2010) has the correct path but when I remove it, the path gets erased. Adding a new target defaults to “…/…/juce”, which has to be fixed. However, I don’t lose the path if I add a new target first and then delete the old one. That’s a way to avoid it. Is there a reason it couldn’t keep the correct path, even if all the targets are removed and then apply it to new targets? I think it would be helpful.


#4

 

Is there a reason it couldn't keep the correct path, even if all the targets are removed and then apply it to new targets? I think it would be helpful.

Yeah, it's not quite as simple as that, because if you're e.g. running on OSX but modifying a VS project, then it can't really know the "correct" path, as it won't exist on that machine. So it'd have to store the last one used somewhere (per project? per module? per target type? globally?).. and each module could have a different path, so which one is correct? What if there are multiple exporters with the same target? etc etc... I did think about implementing this, but hit numerous little annoyances and thought it simpler not to.


#5

Ah, that makes sense. I expected there were some considerations outside my scope :slight_smile: Thanks for clearing that up!