Hi, I am a beginner trying to call a function that changes a variable using Button.onClick. The variable value should be able to be read in other functions. When I use this code here I get the error "LNK2019: unresolved external symbol “void __cdecl instrumentMenu(void)” (?instrumentMenu@@YAXXZ) referenced in function “public: __cdecl <lambda_9b45ac06c69a8345ca6672a7847f3ed4>::operator()(void)const”
I also get this error for the exitMenu() as well. How could I fix this error, or is there a better way to do this?
#include "PluginProcessor.h"
#include "PluginEditor.h"
#include <iostream>
#include <string>
using namespace std;
string currentPage = "Home";
void instrumentMenu();
{
currentPage = "Instrument";
};
void exitMenu();
{
currentPage = "Exit";
};
insButton.onClick = [this]() {instrumentMenu(); };
exitButton.onClick = [this]() {exitMenu(); };