#189 fg_callbacks.c preprocessor directive error

closed-fixed
nobody
nuisance (37)
5
2013-01-16
2012-12-17
Phi Hung Nguyen
No

Hi,

I was trying to compile the latest svn tarball http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut.tar.gz?view=tar
and encountered a bunch of "error pasting glut and function does not give a valid preprocessing token".

The error is in https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut/src/fg_callbacks.c
where IMPLEMENT_CALLBACK_FUNC_2NAME(a,b) is defined.

To fix it, change "glut"###a##"Func" to "glut"#a"Func". The reason is "#a" already makes a a string, so you don't need the redundant ##.

Discussion

    • status: open --> closed-fixed
     
  • Thanks for the report! This came up on the mailing list as well, and a fixe is committed in r1489