PFAC Library compilation errors

5 views
Skip to first unread message

Kash86

unread,
Jun 6, 2015, 3:46:47 AM6/6/15
to pfac...@googlegroups.com
Hi,

While trying to compile the code, we get this error as undefined reference although the necessary header files have been included in the code.

g++ -fopenmp -I${PFAC_LIB_ROOT}/include -L${PFAC_LIB_ROOT}/lib -lpfac PFAC.cpp
/tmp/ccLm88Rd.o: In function `main':
try.c:(.text+0xc1): undefined reference to `PFAC_create'
try.c:(.text+0xf9): undefined reference to `PFAC_readPatternFromFile'
try.c:(.text+0x10c): undefined reference to `PFAC_getErrorString'
try.c:(.text+0x173): undefined reference to `PFAC_dumpTransitionTable'
try.c:(.text+0x192): undefined reference to `PFAC_getErrorString'
try.c:(.text+0x2f7): undefined reference to `PFAC_matchFromHost'
try.c:(.text+0x30a): undefined reference to `PFAC_getErrorString'
try.c:(.text+0x38b): undefined reference to `PFAC_destroy'
collect2: ld returned 1 exit status

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)

Also while running the simple_example.exe, we have issues while creating the handle,

$ ./simple_example.exe
simple_example.exe: simple_example.cpp:63: int main(int, char**): Assertion `PFAC_STATUS_SUCCESS == PFAC_status' failed.
Aborted (core dumped)

Any pointers or help in fixing these errors is greatly appreciated.

Thanks


Reply all
Reply to author
Forward
0 new messages