i've compiled libpdfdoc and placed the static library
libpdfdoc-static.a in
/usr/lib64/
i've written a small program(test.cpp) to test the library
Code:
#include <iostream>
#include "libpdfdoc.hh"
int main()
{
pdf::Doc *doc = pdf::CreateDoc();
std::cout << "Hello" << std::endl;
return 0;
}
then i run the following and get the output :
Code:
$ g++ -I/home/usr/libpdf/include -c test.cpp
$ g++ -L/usr/lib64 -lpdfdoc_static test.o -o test
test.o: In function `main':
test.cpp:(.text+0x9): undefined reference to `pdf::CreateDoc()'
collect2: ld returned 1 exit status
can anyone tell me what is wrong? i even try placing the full path to the library(
g++ /usr/lib64/libpdfdoc_static.a test.o -o test) but the same error shown..
i'm using Fedora 13 64bits..