gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
Fergus Daly
fergusd84@outlook.com
Thu Dec 15 08:06:01 GMT 2022
>> In a gcc build script terminating with the instruction
>> gcc -w -static -o myexe -O3 ./myarchive.a -lreadline -lncurses -lm
>> I have suddenly started getting very many instances of both of
>> ld: /usr/src/debug/readline-8.2-2/terminal.c:nn various: undefined reference to `{various}'
>> ld: /usr/src/debug/readline-8.2-2/display.c:nn various: undefined reference to `{various}'
>> and the build fails.
The problem was with readline not gcc
and I assume originates in myarchive.a and the required switch -lreadline in the gcc line
rather than in readline: nevertheless I reverted both libreadline-devel and libreadline7
from 8.22 to 7.03 and the problem went away.
More information about the Cygwin
mailing list