im curently working on my project to school. Im writing a text-based adventure game in c while using codeblocks. I started as console application, that went fairly well and i was satisfied. But the project must contain a GUI made in WxWidgets, so i just wanted to add a GUI to my console app, here the problems starts. Im curently fighting with private and public objects in WxWidgets and im still getting this one error C:\Users\Petr2\Desktop\Programko\TextovkaWxW\inventar.cpp|12|undefined reference to WxWFrame::TextCtrl1'|
this error.
I tried to define all my functions into public section WxWidgets.
public:
WxWFrame(wxWindow* parent,wxWindowID id = -1);
virtual ~WxWFrame();
wxString vstup;
static wxString vystup;
static int getInput();
static char input[100];
static int parseAndExecute();
static void moveObject(const char *noun, OBJECT *from, OBJECT *to);
static void executeLook(const char *noun);
static void executeGo(const char *noun);
static void executeGet(const char *noun);
static void executeDrop(const char *noun);
static void executeGive(const char *noun);
static void executeAsk(const char *noun);
static void executeInventory(void);
static int nounIsInTags(const char *noun, const char **tags);
static int listObjectsAtLocation(OBJECT *location);
Here is the function, where im getting the error, its in another .cpp file
void WxWFrame::moveObject(const char *noun, OBJECT *from, OBJECT *to)
{
OBJECT *obj = parseObject(noun);
if (obj == NULL)
{
TextCtrl1->AppendText("I don't understand what item you mean.\n");
}
And i just dont really know, how am i supposed to define my own variable "vystup" or use the TextCtrl1-> AppendText()
I will appreciate every answer and i will add whatever you want from my code or answer any quiestion. I just...dont know, i tried to look for posible answers but nothing that really helped me. So thats why im writing here. Thank you
PS: Im sorry for my bad english