I found that you have to do some additional things for building, running and debugging the executable project in Eclipse (note that I’m doing this on Linux using CDT 4.0.3):
Define your shared library’s project as a reference for your application. In order to do so open the project properties of the executable project, go to project references and select the shared library project (where in my case “shared” is also the name of the shared library).
In the project settings of your executable project, add the shared library to the linker settings, as below:
- Select the project name and right click, then choose property,
- Select C/C++ Build > C/C++ Linker,
- Add the library name of your shared library,
- Specify the shared library path "${workspace_loc:/SharedLib/Debug}"
Reference:
http://dirkraffel.com/2008/06/27/developing-shared-libraries-with-eclipse-cdt/
No comments:
Post a Comment