[Geany-Users] I want to run a c program on Prisoner's Dilemma in Geany but can't

Matthew Brush mbrush at xxxxx
Sat May 2 21:17:56 UTC 2015

On 2015-05-02 07:49 AM, bkpsusmitaa wrote:
> Dear members,
> I installed freeglut3 in my Debian-knoppix system.
> When I use gcc compiler, I write a code like this:
>   gcc abc.c -l glut
>   or
>   gcc abc.c -l glut -o test
> as the case may be. The program compiles okay.
> But I use geany for easier tracking. Unfortunately, geany's build code
> is bit ambiguous. It is:
> gcc -Wall -c "%f" for compile
> gcc -Wall -o "%e" "%f" for build
> How do I pass the glut lib in geany?

Go to Build -> Set Build Commands menu and in the "Build" command add 
your `-lglut` and other linker flags to the end of it. So your example 
above would look like:

     gcc -Wall -o "%e" "%f" -lglut

Matthew Brush

More information about the Users mailing list