|
|
FL_NORMAL_SIZE = 11;
‘FL_NORMAL_SIZE’ does not name a type
This is the sort of error to expect when the C++ compiler doesn't know what the definition is. The appropriate include file has to be used before you reference the variable.
In this case, FL_NORMAL_SIZE is defined in Enumerations.H. That header is normally already included as part of other FLTK headers. I can only guess you're trying to access that variable without a bunch of header files.
When in doubt, use Fl.H:
#include <FL/Fl.H> int main(int argc, ...) { FL_NORMAL_SIZE = 11; }
Fl_Fontsize FL_NORMAL_SIZE = 11;
/usr/lib/x86_64-linux-gnu/libfltk.a(Fl_Widget.o):(.data+0x0): multiple definition of `FL_NORMAL_SIZE'; /tmp/ccdB
GgUp.o:(.data+0x0): first defined here
Here you've defined a conflicting copy of FL_NORMAL_SIZE. This might have worked if you had used this instead:
extern Fl_Fontsize FL_NORMAL_SIZE = 11;
The "extern" part tells the compiler/linker to look for the definition elsewhere, i.e. in the FLTK library, not in your code.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/798cd802-dd99-4d3e-a9b6-a63e8854f35fn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |