under the geany 'build' menu item is the selection: Set Build Commands
after clicking build
then Set Build Commands
the Set Build Commands
window opens.
under the first column is label
under that is Compile
to the right of Compile
is a text box where you type the compile command.
ON my system, the contents of the compile text box is:
gcc -ggdb -Wall -Wextra -Wconversion -std=gnu11 -pedantic -Wmissing-prototypes -c "%f" -I.
the next line down is labeled Build
to the right of the Build
is a text box where you type the link command.
On my system, the contents of the build text box is:
gcc -ggdb -Wall -Wextra -Wconversion -std=gnu11 -pedantic -o "%e" "%f" -lpthread -lm
(actual contents will vary for special needs)
Notice, at the END of the Build
text box are the library items to be included. Amongst those libraries is the libm.so
(which is written without the lib
and without the so
.) I.E. -lm
That is all that is needed to compile and link 'many/most' programs.
Note: the parameter -ggdb
is to have the compile and link steps include all the debug information for the gdb
debugger