Adding Juce to project


I would like to know what is the correct way of adding Juce to an existent project? I have a GUI project where the everything that is UI is already done and I would like to use Juce only for it’s audio capabilities. Not even something complicated yet, for now just for audio recording for example.

I have tried adding the modules I think I need, but when I try to compile I get a lot of errors such as
C:\dev\Projects\Test\juce_audio_devices\audio_io\juce_AudioIODevice.h:43: error: variable ‘JUCE_API AudioIODeviceCallback’ has initializer but incomplete type

So far I think I would need the juce_audio_devices, juce_audio_formats and some files from juce_core that are in “memory”, “thread” and “Files” modules.
is there a proper way of doing this ? it would be great if I could use juce for audio stuff leaving everything that is UI for something else.

Any insight greatly appreciated. Thanks.

You should be able to add references to existing module CPP files in your project - though there may be build setup quirks involved in doing so (ie; lack of macros to tell JUCE how to be setup).

It’s probably easier to bring your existent code into an Introjucer created project, and choose the required modules.