Archived

This topic is now archived and is closed to further replies.

jlebrech

Win 2 Linux

Recommended Posts

Can anyone help me to change this program from windows executable to linux executable. It was originally for linux but now the make file won''t work can you help. No code changes are needed, cos its in glut but it wont compile properlly in the new linuxes, cos i made it for slakware at first heres the link http://www.lebrech.fsnet.co.uk/digalog.html Thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I was confused at first because of the .c extension (I assumed C code), so I did this and it went fine:



#ifndef FALSE
# define FALSE 0
# define TRUE !FALSE
#endif



But since you''re using the C++ compiler (and headers), you''d better use C++''s "true" and "false" along with "bool" variables.

The only real problem I see with the Imakefile is that you assume the presence of libMesaGL and libMesaGLU. Some (many?) people don''t use the Mesa implementation and, on their systems, you''ll have to link against libGL and libGLU.

Also, you don''t need the -L/usr/X11R6/lib in Imakefile, nor do you need all the X11 specific libraries (libX11, libICE, libext, etc) : this is taken care of by GLUT (actually, do you even need to explicitly link against libGL and libGLU?)

Finally, I''d like to encourage you to use the C++ versions of the C headers (cstdlib, ctime, cmath) as well as the "new" STL headers (iostream, as opposed to iostream.h).


Hope this helps.

Share this post


Link to post
Share on other sites