This static C library (libabc.a) is linked to a C++ program.
In my pro file for qmake, I have used LIBS += pathToLib/libabc.a
I had no problems when I created the static library.
When using qmake and gmake to compile and run the cpp application, the object files for other cpp files are created but I get the following error:
../abc/libabc.a(mdl.o): In function 'SetExt':
abc/src/mdl.c:2186: undefined reference to 'func1'
In mdl.c, both declaration and definition is there.
static void func1(int *, char *, char *);
static void func1(int *m, char *p, char *s)
{
.....
}
The function call of this function is in the C file mdl.c. Have I made a mistake when creating the static library (using gcc and ar)? or, what am I missing out?