Menu

#241 Undefined symbol fghJoystickRawRead in libglut.so.3.10.0

None
closed-fixed
nobody
None
5
2022-08-30
2017-11-28
No

The issue is that fghJoystickRawRead() function is declared as static void in freeglut-3.0.0/src/fg_joystick.c and later is used in freeglut-3.0.0/src/x11/fg_joystick_x11.c. But
a) there's no declaration of fghJoystickRawRead() in fg_joystick_x11.c;
b) it's invisible here, as it's local to fg_joystick.o.
The following patch fixes the issue but side effect is that fghJoystickRawRead() symbol is exported from libglut.so.

1 Attachments

Related

Bugs: #241

Discussion

  • rcmaniac25

    rcmaniac25 - 2018-01-07

    You don't need to remove the static modifier in fg_joystick.c, which prevents te function from being exported. All you should need is to add "static" to the foward declartion you made in fg_joystick_x11.c

     
    • Diederick C. Niehorster

      So to be clear (as i can't test this), the solution is to add:
      static void fghJoystickRawRead( SFG_Joystick joy, int buttons, float* axes );

      to fg_joystick_x11.c?

      Cheers,
      Dee

      On Sun, Jan 7, 2018 at 8:33 AM, rcmaniac25 rcmaniac25@users.sf.net wrote:

      You don't need to remove the static modifier in fg_joystick.c, which prevents te function from being exported. All you should need is to add "static" to the foward declartion you made in fg_joystick_x11.c


      [bugs:#241] Undefined symbol fghJoystickRawRead in libglut.so.3.10.0

      Status: open
      Group:
      Created: Tue Nov 28, 2017 04:34 AM UTC by Alexander Pyhalov
      Last Updated: Tue Nov 28, 2017 04:34 AM UTC
      Owner: nobody
      Attachments:

      The issue is that fghJoystickRawRead() function is declared as static void in freeglut-3.0.0/src/fg_joystick.c and later is used in freeglut-3.0.0/src/x11/fg_joystick_x11.c. But
      a) there's no declaration of fghJoystickRawRead() in fg_joystick_x11.c;
      b) it's invisible here, as it's local to fg_joystick.o.
      The following patch fixes the issue but side effect is that fghJoystickRawRead() symbol is exported from libglut.so.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freeglut/bugs/241/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #241

  • John Tsiombikas

    John Tsiombikas - 2022-08-30

    This should no longer be an issue. While trying to fix the freeglut build on freebsd I changed this function to not be static, and moved its declaration to fg_internal.h.

     
  • John Tsiombikas

    John Tsiombikas - 2022-08-30
    • status: open --> closed-fixed
    • Group: -->
     

Log in to post a comment.