Unable to build base Projucer projects in VS 2017

windows

#1

Hello,

I’ve been trying to get started with JUCE for a few days now but am having some trouble building the base projects in VS 2017. For all the types of projects I have tried (Audio Plug-In, GUI Application and Console Application), I get this same error when I open VS and try to build it:

Error	C1083	Cannot open include file: 'juce_audio_basics/juce_audio_basics.cpp': No such file or directory	Console1_ConsoleApp	c:\users\skizye\documents\workspace\juceprojects\console1\jucelibrarycode\include_juce_audio_basics.cpp	9	

It looks like I get one of these errors for each of the include_juce_* files in JUCE Library Code. The line that it errors out on is this:
#include <juce_audio_basics/juce_audio_basics.cpp>

In VS I have verified that my JUCE modules folder is added as an Additional Include Directory under Project Properties > Configuration Properties > C/C++ > General, and the juce_audio_basics/juce_audio_basics.cpp file is there (along with all the others I get errors about).

Has anyone seen this error before or able to offer any ideas on how to debug?

I’m using Projucer 5.4.1 on Windows 10. It’s likely some kind of issue with my environment, I am new to C++ and VS2017 (and windows development in general). Greatly appreciate any help, thanks in advance!


#2

Updates: I found that I had been editing the include directory property only for the debug configuration in VS, but even updating it for all configurations I get the same error. I’ve also tried fully qualifying the include paths in the files under JUCE Library Code instead of using system paths, which still gives a similar error:
Error C1083 Cannot open include file: 'C:\lib\JUCE\modules\juce_audio_basics\juce_audio_basics.cpp': No such file or directory GUI1_App c:\users\skizye\documents\workspace\juceprojects\gui1\jucelibrarycode\include_juce_audio_basics.cpp 10

i.e. I changed this:
#include <juce_audio_basics/juce_audio_basics.cpp>

to this:
#include "C:\lib\JUCE\modules\juce_audio_basics\juce_audio_basics.cpp"


#3

You shouldn’t need to manually edit the include paths in Visual Studio, the module paths will be added when you save the project in the Projucer. What does the module section of your project look like when you open in in the Projucer? It should look something like this if the paths are correct:


#4

Think I figured it out, you’re right I didn’t need to mess around with include paths. I’m coming from linux/OSX development so I think at some point I used WSL (bash) to mess around in the JUCE directory which I suspect somehow broke those includes. In this case I redownloaded JUCE, put it in a different location and pointed projucer at the new copy and it builds fine now. I noticed a similar thing trying to get wdl-ol to build over the weekend, checking it out with git in WSL leads to weird broken includes, but checking it out with git for windows works perfectly fine. Lesson learned not to rely too much on WSL :confused:
Anyway just glad I got it working, thanks a ton for the response!