HelloWorld on Linux -- won't compile

Hi all,

I’m brand new to Juce. I’ve downloaded from the Juce website and from git and I still can’t get going. The problem and context are:

  • Debian 8
  • In terminal, I navigate to ~/Juce/examples/HelloWorld/Source
  • I try to compile Main.cpp with clang (which works fine for all other uses)

Error message:

In file included from Main.cpp:10:
./…/JuceLibraryCode/JuceHeader.h:18:10: fatal error: ‘juce_core/juce_core.h’ file not found
#include <juce_core/juce_core.h>
1 error generated.

Try actually using the makefile we provide (in Builds/Linux), which will set up the paths and compiler flags correctly, and will build and link all the files you need.

(I don’t think you’ll find many projects out there where you can just randomly run a compiler on one of their cpp files with no flags, paths, or defines and expect it to do the right thing!)

Perfect! Thanks so much!!!


So to do a project, I would:

1, Boot up Projucer and choose an option
2. Do I then drop in my ‘other’ non-Juce code at the appropriate place?

or do I add Juce-calls to my software and drop the whole thing into a Projucer project.

Ie., what’s the best way to ‘work’?


2 is definitely the intended option when working with JUCE. Drop your external files into the Projucer project, making sure they’re someplace on-disk that won’t be moved (or better yet in your Projucer projects’s /Sources folder) and generate your IDE/make files from the Projucer.