Netbeans / C++: Link 2 projects together (Executable / Dynamic Library)
c++, dynamic-library, netbeans, project
Solution
Yes it's possible:
- `Application Project -> right click -> Properties -> Linker`
- `Libraries -> ... -> Add Project` -> select your library project (-> check Build and select the Configuration if necessary)
- Add the proper include directory at C or C++ Compiler settings
- `Properties -> Related Projects` -> ... -> at your library project there
Not sure if step #4 is required.
If you build your application project, the library project will get build too.
Problem
I am creating 2 projects at the moment. The first one is an executable application. The second one is a Dynamic Library. Is there a way to link the Dynamic Library to the application in Netbeans so when I run the application I can load in the Dynamic Library. I know I could just copy the built files over, but that is a pain in the ass as I need to test if it's working every minute. Does anyone know how to do this? I'm pretty sure it's possible as it would be so useful in many cases.