I have installed fltk library on MSYS2 using the pacman. However, I am currently facing problem in compiling simple example code in C++ which is given below along with the error message.
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-
mingw32/bin/ld.exe:
C:\msys64\tmp\ccKVc9rm.o:hello_windows.cpp:(.text+0x30): undefined reference to
`Fl_Window::Fl_Window(int, int, char const*)
I feel that this error is because g++ is unable to find the fltk library The above mentioned c++ source code(taken from Programming and Principle):
#include <FL/Fl.h>
#include <FL/Fl_Box.h>
#include <FL/Fl_Window.h>
int main() {
Fl_Window window(200, 200, "Window title");
Fl_Box box(0,0,200,200, "Hey, I mean, Hello, World!");
window.show();
return Fl::run();
}
Please help me in compiling this program.