lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Allright, I finally made it work with the sources from the git
repository. I had to add a few lines of code in the hpdf.h file:
typedef HPDF_HANDLE   HPDF_Dict;
typedef HPDF_Dict     HPDF_EmbeddedFile;
typedef HPDF_Dict     HPDF_OutputIntent;
typedef HPDF_HANDLE   HPDF_Xref;

Without those, it complained about '...' missing or '=' or something
like '__asm__' (I don't remember well). I don't understand these very
well and I didn't tried very hard. The two in the middle are from the
hpdf_objects.h file which is not included.

The demo worked fine! :D The library is awesome! Just need to figure
out a way to write text on a curve and it will be perfect.

There is only a small catch however, but I think this is due to some
compilation trick. In order to make the demo work, I have to export
the DYLD_LIBRARY_PATH with my library directory (which is not the
typical /usr/(local/)lib but /opt), otherwise it doesn't find the
hpdf.dylib file. The problem is that if I export it in my
bash_profile, MacVim (and probably other) doesn't launch anymore.

So, is there a flags to set when compiling Haru PDF library to have a
.so instead of the .dylib thing (DYnamic LIBrary?) ? As it may be
related to my platform, MacOSX, I will try to replace '-shared' with
'-bundle -undefined dynamic_lookup' (if any), it worked last time ;-).
I'll keep you posted.

Thanks for your help.

-- Cédric



On Thu, Aug 5, 2010 at 23:51, Tim Channon <tc@gpsl.net> wrote:
> On 04/08/2010 15:27, Cedric Mauclair wrote:
>> Hi,
>>
>> Is the project still alive? I couldn't build it with the latest Haru
>> PDF library that I found here (http://github.com/tony2001/libharu).
>> The compiler (or preprocessor) complains about the files from the
>> latest Haru PDF library. Not a linking problem this time :P
>>
>> So the question is: has someone successfully built the LuaHPDF library
>> lately and could spare some information on how he or she made it
>> please ? (see http://luahpdf.luaforge.net/)
>>
>> -- Cédric
>>
>
> Built it recently without problem. (openwatcom and as dll for win32)
>
> Hint: there seems to be a corrupt source version and that will not work.
>
> Try Haru 2.0.8 but beware something says it is when it isn't. Took a
> while to figure this out.
>
>
>
>
>
>