Link the static system library libm.a in Code::Blocks

1.5k views Asked by At

I successfully compile my program in the shell with the command below. It produces the example binary file and works normally.

gcc -g -o build/debug/example -Iinclude docs/example.c \
build/debug/libmupdf.a \
build/debug/libfreetype.a build/debug/libjbig2dec.a \
build/debug/libjpeg.a build/debug/libopenjpeg.a \
build/debug/libz.a -lm

However, it doesn't work if I try to compile in Code::Blocks. The project build options look like this:

Project build options The compiler gives one error:

more undefined references to 'FT_Name_Index' Fellow

I think I made a mistake while linking the static system library libm.a. How can I link it properly?

1

There are 1 answers

0
pang1567 On BEST ANSWER

i fix it like this enter image description here

use the command int the other linker option directly