Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile due to private Fl_Spinner members #84

Open
camthehaxman opened this issue Jun 15, 2024 · 1 comment
Open

Fails to compile due to private Fl_Spinner members #84

camthehaxman opened this issue Jun 15, 2024 · 1 comment

Comments

@camthehaxman
Copy link

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
Copy link

dannye commented Jun 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants