I didn't use the supplied makefile because I wanted to work within the IDE I use (Codelite). I can then very rapidly build the library and link it to my live application for testing and profiling. The HAVE_CONFIG_H (missing the H) was just a typo in my posting. I'm not compiling to the K&R standard but the default gnu89 gcc standard since it will catch more things.
I thought that the XInput2.h / libXi.a dependency would be of interest since this is new in 2.8.0 -- 2.6.0 does not show this dependency and anyone building the library (without using the supplied makefile) could run into this. It is not a big deal.
> Date: Mon, 27 Feb 2012 04:46:59 +0100 > From: firstname.lastname@example.org > To: email@example.com > Subject: Re: [Freeglut-developer] Working with 2.8.0 > > On Sun, Feb 26, 2012 at 03:24:24PM -0800, Clive McCarthy wrote: > > > > I extracted from the SourceForge tarball. I built a freeglut > > static library on Ubuntu Linux 10.10 with gcc 4.4.5 after running > > ./configure. I did not use the supplied makefile. > > Why not? > > > I compiled with -O2 -Wall -pedantic -DHAVE_CONFIG > > You should have defined HAVE_CONFIG_H > > > freeglut_gamemode.c has > > unused variables: event_base and error_basefreeglut_gamemode.c has an > > unused function xrand_resize which is flagged because it is declared > > static > > You're obviously not compiling XR&R support in freeglut. See above. > > > When the resulting library is linked with my application I found that > > XISelectEvents is unresolved. This a function from XInput2.h / libXi.a > > which was not needed for freeglut 2.6.0Linking my application to > > libXi.a resolves this. Maybe I should have bound my static library to > > libXi.a beforehand? > > If you take a look at the proper build, it uses: > -lGL -lXext -lX11 -lm -lXi -lXrandr -lXxf86vm > So yeah... you're missing some libraries. > > > My plan is to exercise gamemode and try a little profiling. > > By all means, but please compile the library properly first otherwise it > wouldn't be meaningful. Don't compile manually, use the build system > (ideally cmake). > > -- > John Tsiombikas > http://nuclear.mutantstargoat.com/ > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Freeglut-developer mailing list > Freeglutfirstname.lastname@example.org > https://lists.sourceforge.net/lists/listinfo/freeglut-developer