In Microsoft Visual Studio 2010, it is possible to create a Solution with multiple projects and set dependencies between projects. I'm trying to figure out if the same thing can be done using Eclipse via the NDK. More specifically, I want to know if it is possible to create C source files in an ordinary Android project that can reference C header files in an Android library project.
For example:
Android library project: Sockets
Ordinary Android project: Socket_Server
Sockets contains all the C header/source files that are needed to do socket I/O.
Socket_Server contains test code that makes calls to the functions that are defined in Sockets library project. This test code requires a header file that contains the function declaration of all API calls.
I already set the library dependencies between the projects via:
Properties > Android > Library > Add
In Socket_Server, there's a file called SocketTestServer.cpp. It contains test code, but makes API calls to the library project, Sockets, and does so by #include "Nv_Socket.h", which is not part of Socket_Server:
jni/SocketTestServer.cpp:1:23: fatal error: Nv_Socket.h: No such file or directory
compilation terminated.