I created a static library in C
, that is, after compiling the file .c
, generated a file with .a
extension. In the file .c
I implemented some functions. How could I read this lib in another program and call a function from it? I'm just giving the .h include in the program, and when I compile the program it displays in the error message: undefined reference to func () which follows just below:
#ifndef STATIC_H
#define STATIC_H
extern int func();
#endif