I have a open source project written in C and learning to wrap it with C++. All the functions used in C are defined in header and I have linked those in my C++ code as static library (having include and lib files). Now if i try to access/use function for example display() written in C open source from my main.cpp it is throwing undefined reference error.
Note: C open source and wrapper directories are not in same location. Just copied include and lib and linked to C++ project.
Error texts
CMakeFiles\wrapper.dir/objects.a(main.cpp.obj): In function `main':
G:/Development/wrapper/main.cpp:34: undefined reference to `IedConnection_create'
G:/Development/wrapper/main.cpp:36: undefined reference to `IedConnection_connect'
IedConnection_create is a function written in open source and have included the corresponding header in my C++ code.
Can anyone help me out of this ? Thanks