Polybios in android

Discuss PDF file handling with the Polybios plugin here
User avatar
Posts: 279
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO

Re: Polybios in android

Post by jPV » Mon Jun 25, 2018 5:29 pm

airsoftsoftwair wrote:
Sun Jun 24, 2018 12:38 pm
jPV wrote:
Sat Jun 23, 2018 2:25 pm
BTW. I just came up with a problem when I try to use LoadPlugin instead of @REQUIRE on MorphOS.

If I do:

Code: Select all

doc = pdf.CreateDocument()
I get an error: Constant not found!

So it doesn't recognize the #HPDF_COMP_ALL constant when I've loaded the plugin with the LoadPlugin function, but it does work if I change LoadPlugin to @REQUIRE.... what's wrong here? I'd like to load the plugin only if needed in this case...
Well, constants are evaluated at preprocessor level and at that time #HPDF_COMP_ALL obviously isn't there because the plugin is loaded at runtime. So using constants made available by plugins can be a little tricky, but the following should work:

Code: Select all

That doesn't seem to help. It still gives the same error... any other tricks to try? :)

User avatar
Posts: 3185
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany

Re: Polybios in android

Post by airsoftsoftwair » Tue Jun 26, 2018 12:04 pm

Oops, looks like a bug, fixed now.

Code: Select all

- Fix: When loading plugins at runtime using LoadPlugin(), plugin constants weren't loaded at all

Post Reply