5.6. Compiling the test file

Problem:

The cif_test.c file doesn't compile.

Cause:

GCC examines its objects and libraries only once, in linear order from first to last on the command line.

Solution:

If your compile command line looks like this:

[root]# gcc -I/usr/cogent/include -L/usr/cogent/lib -lcogent -lsrr -o cif_test cif_test.c

You need to modify it to:

[root]# gcc -I/usr/cogent/include -L/usr/cogent/lib cif_test.c -lcogent -lsrr -o cif_test

Then it should work fine.