Can anybody tell what I am doing wrong? Why do I get that linker error
with FLTK 2.0.x, but not with FLTK 1.4.x?
TIA
------ Main.cpp -------
#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
#include "NewAccountDlg.H"
int main (int argc, char *argv[])
{
jme::NewAccountDlg nad(300,200,"Maya");
return fltk::run();
}
------ NewAccountDlg.H -------
#ifndef NEW_ACCOUNT_DLG_H
#define NEW_ACCOUNT_DLG_H
#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
#include <string>
namespace jme{
class NewAccountDlg : public fltk::Window{
private:
public:
NewAccountDlg(int, int, const char*);
~NewAccountDlg();
}; //NewAccount
}
#endif
------ NewAccountDlg.C -------
#ifndef NEW_ACCOUNT_DLG_H
#include "NewAccountDlg.H"
#endif
jme::NewAccountDlg::NewAccountDlg(int w, int h, const char* t)
: fltk::Window( w, h, t ){
begin();
fltk::Widget* box = new fltk::Widget(10,10,w-20,h-20,"Maya");
box->box(fltk::UP_BOX);
box->labelsize(36);
box->labelfont(fltk::HELVETICA_BOLD_ITALIC);
box->labeltype(fltk::SHADOW_LABEL);
this->end();
this->show();
}
jme::NewAccountDlg::~NewAccountDlg(){}
------ Error Message -------
Compiler: Default compiler
Building Makefile: "C:\jme\lib\cpp\wimm\Makefile.win"
Executing make clean
rm -f main.o NewAccountDlg.o wimm_private.res wimm.exe
g++.exe -c main.cpp -o main.o -I"C:/DEV-CPP/include/c++"
-I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward"
-I"C:/DEV-CPP/include"
g++.exe -c NewAccountDlg.C -o NewAccountDlg.o
-I"C:/DEV-CPP/include/c++" -I"C:/DEV-CPP/include/c++/mingw32"
-I"C:/DEV-CPP/include/c++/backward" -I"C:/DEV-CPP/include"
windres.exe -i wimm_private.rc -I rc -o wimm_private.res -O coff
g++.exe main.o NewAccountDlg.o wimm_private.res -o "wimm.exe"
-L"C:/DEV-CPP/lib" -mwindows -lfltk -lole32 -luuid -lcomctl32 -lwsock32 -lm
C:/DEV-CPP/lib/libfltk.a(fl_color.o)(.text+0x4ec):fl_color.cxx:
undefined reference to `SetDCPenColor@8'
C:/DEV-CPP/lib/libfltk.a(fl_color.o)(.text+0x526):fl_color.cxx:
undefined reference to `SetDCBrushColor@8'
make.exe: *** [wimm.exe] Error 1
Execution terminated
--
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|