Hello, I'm following this tutorial http://fox-toolkit.net/cgi-bin/wiki.pl?Tutorial__Simple_Window
To learn how to make gui programs using the fox toolkit, but I can't get it to compile.
This is what I have in main.cpp
#include <fx.h>
#include "mywindow.h"
FXDEFMAP(MyWindow) MyWindowMap[]={0
};
FXIMPLEMENT(MyWindow,FXMainWindow,MyWindowMap,ARRAYNUMBER(MyWindowMap));
int main(int argc,char ** argv) {
FXApp application("Tutorial #1","FOX Tutorials");
application.init(argc,argv);
new MyWindow(&application);
application.create();
return application.run();
}
This is what I have in mywindow.h
class MyWindow : public FXMainWindow {
FXDECLARE(MyWindow)
private:
MyWindow() {}
public:
MyWindow(FXApp *);
virtual ~MyWindow();
virtual void create();
};
void MyWindow::create(){
FXMainWindow::create();
show(PLACEMENT_SCREEN);
}
But I'm getting these errors
objs\main.o:main.cpp:(.text+0x376): undefined reference to `MyWindow::MyWindow(FX::FXApp*)'
objs\main.o:main.cpp:(.rdata$_ZTV8MyWindow[vtable for MyWindow]+0x20): undefined reference to `MyWindow::~MyWindow()'
objs\main.o:main.cpp:(.rdata$_ZTV8MyWindow[vtable for MyWindow]+0x24): undefined reference to `MyWindow::~MyWindow()'
collect2: ld returned 1 exit status
I've searched ,but I can't figure out the answer.
I'm using windows with codeblocks and mingw.