[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
.. undefined reference to ..
From: |
andreas graeper |
Subject: |
.. undefined reference to .. |
Date: |
Sun, 29 Aug 2021 13:19:53 +0200 |
helo,
i try to make bacnetstack.
1) build static lib .a works (i guess)
2) build demos using lib stops
error not each time in first demo-directory and all demos using the lib
maybe the lib is rebuild for every demo (or at least in some cases) ?
maybe an error in makefile (youtube: a whitespace character .. drives
crazy)
xxx/
include/
src/
lib/ <- lib_xxx.a
demos/
demo1/
demo2/
xxx/make first demo breaks (but cause of order)
xxx/demo/make first demo works, second breaks
same demo that breaks, but there is one that does not. generally the lib
works.
difference in demo1/Makefile and demo2/Makefile is a $(TARGET).map that
is
removed in 'clean'-target ( i have not heard about .map and did not find
enough info. so no clue )
the working demo does not use the missing symbol.
when using `make -d ..` there is a line 'pruning lib_xxx.a' and i found
something with 'simplifying decision trees' (wikipedia). what does pruning
lib means ?
is there a step where only parts depending on wrong decision are extracted
from a static library so that in the end symbols are missing ? ( similiar
to wrong order of object-files when linking )
nm lib_xxx.a | grep ?symbol?
shows symbols twice: T (in .txt) with address and U (undefined)
i found (google): small differences in names, but demangling? only with
c++, not c.
and i have equal symbols ( T and U ) maybe the linker finds the U-entry
first and gives up ? ( but one demo works )
guess, the lib is ill.
hope, my English is not that bad.
hope, You can help.
thanks in advance,
andreas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- .. undefined reference to ..,
andreas graeper <=