I created a project library in Clion and got a *.a file. In qt_gui.pro I added:
LIBS += -L /path/to/*.a/file
INCLUDEPATH += /path/to/directory/h_files
Also I created new .h file with:
extern "C" {
#include "foo.h"
}
void qt_foo();
And .cpp file:
void qt_foo(){
foo();
}
When I calling qt_foo() I getting
error: undefined reference to `foo'
foo.h in library:
#ifdef __cplusplus
extern "C" {
#endif
void foo();
#ifdef __cplusplus
}
#endif