OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000340OMNeT++IDE / C++ developmentpublic2011-06-10 14:122011-06-10 14:12
0000340: Missing make target dependency when building with statically linked libraries
Let's say that module FOO depends on module BAR. The build system is configured such that BAR builds a statically linked library, and FOO builds an executable linked with the library of BAR. When a build for FOO is requested the build system automatically rebuilds the statically linked library of BAR if one of its C++ source files changed. So far so great!

The problem is that the FOO executable is not rebuilt! This happens because the makefile dependency between the executable of FOO and the library of BAR is missing.

This not only happens in the same project. It also happens cross project and when only statically linked libraries are involved.

The actual example I found was this:
 - INET built as a statically linked library
 - MIXIM built as multiple statically linked libraries (depending on the library of INET)
 - MIXNET built as a statically linked library (depending on the libraries of MIXIM and INET)
 - a MIXNET example built as an executable (depending on the libraries of MIXNET)

Changing a C++ source file in INET caused to rebuild the library of INET and stopped there.

Adding lines such as:
$O/$(TARGET): $(INET_PROJ)/out/$(CONFIGNAME)/src/inet.lib $(MIXIM_PROJ)/out/$(CONFIGNAME)/base/miximbase.lib $(MIXIM_PROJ)/out/$(CONFIGNAME)/modules/miximmodules.lib

etc. could workaround this problem. It is difficult to figure this out and it is very inconvenient when one has a couple of executables and libraries.

Of course we all know that with dynamically linked libraries this looks differently...
No tags attached.
Issue History
2011-06-10 14:12levyNew Issue

There are no notes attached to this issue.