如何传递给 gcc“-lregex”?

如何传递给 gcc“-lregex”?

我想在 hpux 下编译一个程序,bacula,但给我一个关于“不满意的符号”的错误,我认为传递正确的库“-lregex”可能会解决问题。但我不知道如何传递给链接器(是一个 ld 错误)我尝试过 LDFLAGS="-lregex" 但没有工作(给我 gcc 无法创建可执行文件)我还尝试添加到 makefile 的 LIBS - lregex 但没有任何改变

这是完整的错误

libtool --silent --tag=CXX --mode=link /usr/local/bin/g++   -L../lib -L../findlib -o bacula-fd filed.o authenticate.o acl.o backup.o estimate.o  fd_plugins.o accurate.o  filed_conf.o heartbeat.o job.o pythonfd.o  restore.o status.o verify.o verify_vol.o xattr.o \
         -lbacfind -lbacpy -lbaccfg -lbac -lm  -lpthread  \
         -lssl -lcrypto   
ld: Unsatisfied symbol "regerror(int, re_pattern_buffer const*, char*, unsigned long)" in file job.o
ld: (Warning) Unsatisfied symbol "regexec(re_pattern_buffer const*, char const*, unsigned long, regmatch_t*, int)" in file /home/giuseppe/bacula/bin/bacula-5.2.13/src/findlib/.libs/libbacfind.so
ld: Unsatisfied symbol "regcomp(re_pattern_buffer*, char const*, int)" in file job.o
ld: (Warning) Unsatisfied symbol "posix_fadvise(int, long long, long long, int)" in file /home/giuseppe/bacula/bin/bacula-5.2.13/src/lib/.libs/libbac.so
ld: Unsatisfied symbol "regfree(re_pattern_buffer*)" in file job.o
2 warnings.
3 errors.
collect2: ld returned 1 exit status
*** Codice di uscita errore 1

相关内容