Would like to add that the following errors are reported
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::Init(const
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>&,const pcrecpp::RE_Options*)
ld: 0711-317 ERROR: Undefined symbol: pcrecpp::RE::no_arg
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::FullMatch(const
pcrecpp::StringPiece&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&) const
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::~RE()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
with the option -bnoquiet
(ld): halt 4
(ld): setfflag 4
(ld): savename main
(ld): filelist 8 1
(ld): i /lib/crt0.o
(ld): i main.o
(ld): lib ./libpcre.a
(ld): lib ./libpcrecpp.a
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vacpp/lib/libC.a
(ld): lib /usr/lib/libm.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libpcre.a[libpcre.so.0]: 36 symbols imported.
LIBRARY: Shared object libpcrecpp.a[libpcrecpp.so.0]: 92 symbols imported.
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr_32.imp]: 400
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr2_32.imp]: 42
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr3_32.imp]: 33
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[ansi_32.imp]: 2360
LIBRARY: Shared object libC.a[ansi_32.o]: 2591 symbols imported.
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr_64.imp]: 0
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr2_64.imp]: 0
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[shr3_64.imp]: 0
LIBRARY: Symbols imported from import file
/usr/vacpp/lib/libC.a[ansi_64.imp]: 0
LIBRARY: Shared object libc.a[shr.o]: 2798 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 14 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 8
(ld): resolve
RESOLVE: 232 of 11910 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 67 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR
Import-File{Shared-object}
RLD: Address Section Rld-type
Referencing Symbol
----------------------------------------------------------------------------------------------
.pcrecpp::RE::Init(const
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>&,const pcrecpp::RE_Options*) [424] ER PR main.cpp(main.o)
00001fe0 .text R_RBR [92]
.pcrecpp::RE::RE(const char*)
pcrecpp::RE::no_arg [386] ER UA main.cpp(main.o)
00002988 .data R_POS [388]
<pcrecpp::RE::no_arg>
.pcrecpp::RE::FullMatch(const pcrecpp::StringPiece&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&) const [426] ER PR main.cpp(main.o)
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::Init(const
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>&,const pcrecpp::RE_Options*)
ld: 0711-317 ERROR: Undefined symbol: pcrecpp::RE::no_arg
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::FullMatch(const
pcrecpp::StringPiece&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&,const pcrecpp::Arg&,const
pcrecpp::Arg&,const pcrecpp::Arg&) const
0000218c .text R_RBR [96] .main
.pcrecpp::RE::~RE() [428] ER PR main.cpp(main.o)
000021b0 .text R_RBR [96] .main
00002880 .text R_RBR [130]
.pcrecpp::RE::__dftdt()
ER: The return code is 8.
ld: 0711-317 ERROR: Undefined symbol: .pcrecpp::RE::~RE()
On 2009-01-27 13:17, Fasih Ahmed wrote:
> Hello,
>
> I am unable to link pcre and pcrecpp with a simple cpp application on
AIX.
> I'm using pcre 7.6.
> main.cpp:
> #include
> #define PCRE_STATIC 1
> #include "pcrecpp.h"
>
> int main()
> {
> return pcrecpp::RE("([a-zA-Z0-9])+").FullMatch("kjdshjdfh$%^346");
> }
>
> compiling with: /usr/vacpp/bin/xlC -c main.cpp -I./
>
> linking with teh following command: /usr/vacpp/bin/xlC -o main main.o
> -L/home/qa/fasihWork/ -lpcrecpp -lpcre
>
> Any help would be appreciated.
>
>
>