I am attempting to compile C code which accesses the libredwg library through a header file: #include "dwg.h"
When I attempt to compile my code using gcc -o ldwg load_dwg.c, I get the following error: undefined reference to `dwg_read_file'.
However, if I load the file in Kdevelop, I get no such error message. If I change `dwg_read_file' to 'foo' (which is obviously not defined), then I get an error Implicit declaration of function 'foo' is invalid in C99 [-Wimplicit-function-declaration] so I know that the function is being read.
How can I make gcc see the function definition?