Projucer generated project: autogenerated header file doesn't include any juce headers

Hi guys,

I’m new to JUCE and to this forum. I’ve downloaded JUCE v6.1.2 and I have XCode 11.3.1 installed on my Mac Pro with OSX 10.14.6

I have created a new audio plugin project by following the tutorial. I have opened the generated project in Xcode and attempted to build the new project but I have 25 compiler errors referring to undefined identifiers. Upon inspection of the generated project I have failed to find a single line where any of the JUCE library is included.

I have double checked my paths are set correctly. What am I missing?

  • Adam

Please paste the exact text of the error you’re seeing. That will help us to identify the problem.

Perhaps your paths are set incorrectly in the Projucer. Go to the “Global Paths” option in the main menu and check that the “juce path” and “modules path” are set correctly, then resave and rebuild the project.

Here is the contents of the header file generated by projuce:

/*

    IMPORTANT! This file is auto-generated each time you save your
    project - if you alter its contents, your changes may be overwritten!

    This is the header file that your files should include in order to get all the
    JUCE library headers. You should avoid including the JUCE headers directly in
    your own source files, because that wouldn't pick up the correct configuration
    options for your app.

*/

#pragma once

#include "AppConfig.h"

#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
 /** If you've hit this error then the version of the Projucer that was used to generate this project is
     older than the version of the JUCE modules being included. To fix this error, re-save your project
     using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
     remove the JUCE_PROJUCER_VERSION define.
 */
 #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
#endif


#if ! JUCE_DONT_DECLARE_PROJECTINFO
namespace ProjectInfo
{
    const char* const  projectName    = "Rustic";
    const char* const  companyName    = "XDMakesMusic";
    const char* const  versionString  = "1.0.0";
    const int          versionNumber  = 0x10000;
}
#endif

  1. it says it doesn’t recognize juce which means most likely juce is not linked to correctly, i remember once having an issue like this where i had installed a library in a protected c drive folder and visual studio didnt have permission to open it so i’d check that first your code folder is not password protected or admin rights only.

  2. second, go to your juce header you’re including to check where the problem is, maybe its a simple mistake of your folder is called “JUCE 6.1.2” but your pc replaced a space with an underscore so the directory is actually “JUCE_6.1.2”.

i know with visual studio if you hold CTRL and left click on classnames or directories it opens up the original location in another window. check that it actually opens your juce modules and doesnt throw an error like “ERROR: no such file or directory”

this is what my current project header file looks like;

/*

    IMPORTANT! This file is auto-generated each time you save your
    project - if you alter its contents, your changes may be overwritten!

    This is the header file that your files should include in order to get all the
    JUCE library headers. You should avoid including the JUCE headers directly in
    your own source files, because that wouldn't pick up the correct configuration
    options for your app.

*/

#pragma once


#include <juce_audio_basics/juce_audio_basics.h>
#include <juce_audio_devices/juce_audio_devices.h>
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_audio_plugin_client/juce_audio_plugin_client.h>
#include <juce_audio_processors/juce_audio_processors.h>
#include <juce_audio_utils/juce_audio_utils.h>
#include <juce_core/juce_core.h>
#include <juce_data_structures/juce_data_structures.h>
#include <juce_dsp/juce_dsp.h>
#include <juce_events/juce_events.h>
#include <juce_graphics/juce_graphics.h>
#include <juce_gui_basics/juce_gui_basics.h>
#include <juce_gui_extra/juce_gui_extra.h>


#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
 /** If you've hit this error then the version of the Projucer that was used to generate this project is
     older than the version of the JUCE modules being included. To fix this error, re-save your project
     using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
     remove the JUCE_PROJUCER_VERSION define.
 */
 #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
#endif

#if ! DONT_SET_USING_JUCE_NAMESPACE
 // If your code uses a lot of JUCE classes, then this will obviously save you
 // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
 using namespace juce;
#endif

#if ! JUCE_DONT_DECLARE_PROJECTINFO
namespace ProjectInfo
{
    const char* const  projectName    = "GummiEQ";
    const char* const  companyName    = "Gummi Plugins";
    const char* const  versionString  = "0.0.1";
    const int          versionNumber  = 0x1;
}
#endif

so try adding include -module- and see if it tells you that it could not find the specified path.

So, I deleted my new project and started again. I checked that my path was correct and it was. I built another project and had the same problem.

Now, the path that I was using was not the standard path that was recommended in the tutorial, because I have all of my development stuff in a separate folder called ~/Development. I moved JUCE to the folder that was recommended by the tutorial and started again. This time, success!

Maybe there is more than one setting for the path? I’m still new to JUCE so maybe after a bit more playing around I’ll work out how to have JUCE sitting in my development folder along with all the other SDKs I use. But for now, while it’s working, I guess I’ll stick with the recommended folder placement.

Thanks to everyone who replied!