[pcre-dev] [Bug 698] ncurses library not added when linking …

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 698] ncurses library not added when linking pcretest
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=698




--- Comment #1 from Philip Hazel <ph10@???> 2008-04-21 17:25:03 ---
(In reply to comment #0)

> When linking the pcretest utility, and the ncurses library is specified, it is
> not added to the list of libraries to link with.


This issue was recently raised for the Linux environment. The problem is that
the readline library allows a choice of terminal libraries. Its build
instructions say this: "Readline uses the termcap functions, but does not link
with the termcap or curses library itself, allowing applications which link
with readline the to choose an appropriate library."

In many Linux distributions, the readline library is built so that it
automatically pulls in an appropriate library, so this is not an issue.
However, if the user installs readline from source (for example) it can be. I
added some words to the README file (for the next PCRE release) pointing out
that it may be necessary to specify LIBS=lncurses in these cases.

> The library was added using
> the NCURSES_LIBRARY:FILEPATH option to cmake. However, if replacing the line
> below in CMakeList.txt:183:
>
> SET(PCRETEST_LIBS ${READLINE_LIBRARY})
>
> with
>
> SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
>
> it links successfully.


I know very little about CMake, and even less about Windows. I don't think I
should make that change unconditionally, however, for the reason given above.
After all, CMake does work on Linux as well as on Windows.

Does anybody else who sees this message have any ideas?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email