If I write @REQUIRE "polybios"
App is not start

Plugin for armeabi-v7a
Android 4.0.4
Code: Select all
Hollywood 7.1 [Android] [64-bit] (c) by Andreas Falkenhahn
The Cross-Platform Multimedia Application Layer
Loading plugin polybios.hwp...
Preparing display...done
And Action!
Code: Select all
LoadPlugin("polybios")
doc = pdf.CreateDocument()
doc:SetCompressionMode(#HPDF_COMP_ALL)
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:jPV wrote: ↑Sat Jun 23, 2018 2:25 pmBTW. I just came up with a problem when I try to use LoadPlugin instead of @REQUIRE on MorphOS.
If I do:I get an error: Constant not found!Code: Select all
LoadPlugin("polybios") doc = pdf.CreateDocument() doc:SetCompressionMode(#HPDF_COMP_ALL)
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...
Code: Select all
doc:SetCompressionMode(GetConstant("#HPDF_COMP_ALL"))