Extreme frustration. I am on Ubuntu Linux. I have tried to get the simple FLTK programs to compile on various IDE's (VS Code, Eclipse, CodeLite) with no luck. I am back to simple compiling on the Terminal, but that wont work. The problem is I continue to get undefined reference errors - the compiler linker is not finding my header and/or linker files.
In the Terminal I use g++ cs255_lab02_fluid.cpp -i/usr/local/include -l/usr/local/lib -o bin
g++: error: unrecognized command-line option ‘-i/usr/local/include’
With g++ cs255_lab02_fluid.cpp -I /usr/local/include/ -L /usr/local/lib/ -o bin I get a couple dozen undefined reference errors.
My program:
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Button.H>
void cb_btn_animate( Fl_Widget* btn, void* userdata );
int main()
{
Fl_Double_Window window = Fl_Double_Window( 283, 110 );
Fl_Output output = Fl_Output( 30, 15, 100, 25 );
Fl_Button button = Fl_Button( 40, 60, 75, 25, "Animate" );
button.callback( ( Fl_Callback* ) cb_btn_animate, &output );
window.end();
window.resizable( window );
window.show();
return Fl::run();
}
void cb_btn_animate( Fl_Widget* btn, void* userdata )
{
Fl_Output& output = *static_cast< Fl_Output* >( userdata );
output.value( "Hello" );
}
HELP!!! My FLTK library files are in /usr/local/lib and headers are in /usr/local/include/FL