Hey everyone, i’m new to JUCE and coding in general, I’m trying to create a resizable window, I have followed the tutorial exactly but when I run it in xcode I keep getting errors.
https://docs.juce.com/master/tutorial_main_window.html
![Screen Shot 2021-04-05 at 14.34.29|690x147]
/*
This file was auto-generated!
It contains the basic startup code for a JUCE application.
==============================================================================
*/
#include “…/JuceLibraryCode/JuceHeader.h”
//==============================================================================
class MainWindowTutorialApplication : public juce::JUCEApplication
{
public:
//…
//==============================================================================
class MainWindow : public juce::DocumentWindow
{
public:
MainWindow (juce::String name) : DocumentWindow (name,
juce::Colours::lightgrey,
DocumentWindow::allButtons)
{
centreWithSize (300, 200);
setVisible (true);
}
void closeButtonPressed() override
{
juce::JUCEApplication::getInstance()->systemRequestedQuit();
}
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
};
private:
std::unique_ptr mainWindow;
};
//==============================================================================
MainWindowTutorialApplication() {}
const juce::String getApplicationName() override { return ProjectInfo::projectName; }
const juce::String getApplicationVersion() override { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() override { return true; }
//==============================================================================
void initialise (const juce::String& commandLine) override
{
// Add your application's initialisation code here..
mainWindow.reset (new MainWindow (getApplicationName()));
}
void shutdown() override
{
// Add your application's shutdown code here..
mainWindow = nullptr;
}
//==============================================================================
void systemRequestedQuit() override
{
// This is called when the app is being asked to quit: you can ignore this
// request and let the app carry on running, or call quit() to allow the app to close.
quit();
}
void anotherInstanceStarted (const String& commandLine) override
{
// When another instance of the app is launched while this one is running,
// this method is invoked, and the commandLine parameter tells you what
// the other instance's command-line arguments were.
}
};
//==============================================================================
// This macro generates the main() routine that launches the app.
START_JUCE_APPLICATION (MainWindowTutorialApplication)
if more info is needed let me know
Any help would be appreciated, thanks!