jung-kurt / luahpdf

LuaHPDF is a module that lets you programmatically create PDF files using Lua.
23 stars 10 forks source link

error: unknown type name ‘HPDF_Error’ #4

Closed zhongjin616 closed 9 years ago

zhongjin616 commented 9 years ago

hi, now i am using Ubuntu 12.04 in x_86_64. gcc 4.6.3. I just download libharu-RELEASE_2_2_0.tar.gz and complie it from source. when i try to complie your LuaHPDF, it says that the "HPDF_Error" is an unknown type.

compile output: In file included from hpdf.c:10:0: /usr/local/include/hpdf.h:166:19: error: unknown type name ‘HPDF_Error’ hpdf.c: In function ‘luaopen_hpdf’: hpdf.c:3944:3: warning: implicit declaration of function ‘luaL_setfuncs’ [-Wimplicit-function-declaration]

thanks

msva commented 9 years ago

I just built it against libharu-2.3.0 several times. All working fine. So, I guess, you have broken libharu installation.

oh, and about

hpdf.c: In function ‘luaopen_hpdf’:
hpdf.c:3944:3: warning: implicit declaration of function ‘luaL_setfuncs’ [-Wimplicit-function-declaration]

This is fixed in my pull request ( #5 )

zhongjin616 commented 9 years ago

now i use make uninstall' to uninstall the libharu which i compiled from source libharu-RELEASE_2_2_0.tar.gz and usesudo apt-get install libhpdf-dev`, i can compile the luahpdf successfully. as i use lua5.1, this problem:

hpdf.c: In function ‘luaopen_hpdf’: hpdf.c:3944:3: warning: implicit declaration of function ‘luaL_setfuncs’ [-Wimplicit-function-declaration]

will report link error, when try to generate pdf with this hpdf package.

and thanks to @msva, his pull request has fix this problem.

thanks guys.