Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project dependency in Eclipse CDT

Tags:

c++

eclipse

I'm using eclipse for the first time. I'm a seasoned VisualStudio user, so I'm trying to find similar functionality in eclipse. I have two projects, A and B. Project A spits out libA.a when it's done compiling. Project B links against libA.a. Here is my problem.

  1. I compile project A then project B, everything is fine.
  2. I make a code change to project A that requires a build of project A.
  3. I try to build project B, but it states that no changes have been detected.

How do I make project B aware of the output of project A?? Currently I'm having to do a clean build of project B for it to re-link against libA.a.

Thanks.

EDIT: In my ProjectB->Path and Symbols->References tab, I have project A checked. This doesn't relink after project A is rebuilt.

like image 767
MarkP Avatar asked Oct 11 '11 15:10

MarkP


People also ask

What is project dependency in Eclipse?

Each project (dependencies, etc.) must be able to be managed from within the Eclipse IDE without manually editing build.xml files. It must be possible for each project to export a build.xml Ant file such that. It can be used to build all appropriate targets from a command line using CVS and Ant.

How can I see project dependencies in eclipse?

Right-click the project, then select "Properties", then "Java Build Path". The tabs "Projects" and "Libraries" list what the project depends on. Note that the "Order and Export" tab alllows you to have indirect dependencies. All the information here is saved in a file named .

What is Eclipse CDT builder?

A CDT project typically has two builders. The first one is the CDT builder which is responsible for compiling your code. If you are using an external build tool you are most likely using a "makefile project", in which case the CDT builder simply invokes your build tool for you.


2 Answers

Try the below settings:

  1. Go to properties of Main ProjectC/C++ GeneralPaths and SymbolsReferences
  2. Tick all the dependencies.
like image 100
Mamatha Avatar answered Oct 01 '22 08:10

Mamatha


You go into Project Properties of Project B, select Project References and make it reference (depend) on Project A.

Edit, appears to be a known bug

like image 43
nos Avatar answered Oct 01 '22 09:10

nos