I fail with quite a simple problem with a regular expression for libtool-option -export-symbols-regex:
My library has to export several functions that start with "foo_" and "bar_". But the command line option
-export-symbols-regex '(foo_|bar_)'
seems to be wrong, only the foo_-functions are exported.
So: how should this regular expression look like to export both?
Thanks!
Your regex (foo_|bar_)
does not ensure the substrings foo_
and bar_
appear at the start of the function name.
You should include the ^
start of string anchor.
^(foo_|bar_)
More informatin about the start of string anchor can be found at regular-expressions.info/anchors