Rangi42 / tilemap-studio

A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
https://hax.iimarckus.org/topic/7691/
Other
381 stars 30 forks source link

Fails to compile due to private Fl_Spinner members #84

Open camthehaxman opened 2 months ago

camthehaxman commented 2 months ago

It looks like this code tries to access some private fields of the Fl_Spinner class, and that is not allowed!

src/widgets.cpp: In constructor 'OS_Spinner::OS_Spinner(int, int, int, int, const char*)':
src/widgets.cpp:195:9: error: 'Fl_Input Fl_Spinner::input_' is private within this context
  195 |         input_.box(OS_INPUT_THIN_DOWN_BOX);
      |         ^~~~~~
In file included from src/widgets.cpp:6:
/usr/include/FL/Fl_Spinner.H:57:17: note: declared private here
   57 |   Fl_Input      input_;                 // Input field for the value
      |                 ^~~~~~
src/widgets.cpp:196:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  196 |         up_button_.labelfont(OS_FONT);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:197:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  197 |         up_button_.labelsize(OS_FONT_SIZE);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:198:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  198 |         up_button_.box(OS_MINI_BUTTON_UP_BOX);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:199:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  199 |         up_button_.down_box(OS_MINI_DEPRESSED_DOWN_BOX);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:200:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  200 |         down_button_.labelfont(OS_FONT);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:201:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  201 |         down_button_.labelsize(OS_FONT_SIZE);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:202:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  202 |         down_button_.box(OS_MINI_BUTTON_UP_BOX);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:203:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  203 |         down_button_.down_box(OS_MINI_DEPRESSED_DOWN_BOX);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
make: *** [Makefile:56: tmp/widgets.o] Error 1
dannye commented 2 months ago

Those members have been protected since FLTK 1.3.1. They are not private.

You must either be building with an old version of FLTK, or FLTK_ABI_VERSION was unset when your FLTK lib was built. Please review INSTALL.md.