dlbeer / quirc

QR decoder library
Other
865 stars 285 forks source link

Disable LibPNG dependency #98

Closed ricardojlrufino closed 3 years ago

ricardojlrufino commented 3 years ago

How do I disable libpng dependency on the project, I am trying to compile for an embedded platform and had many problems. After commenting on the qrtest.c methods related to png I managed to compile without this dependency.

It would be interesting to have a flag or something to disable this.

ricardojlrufino commented 3 years ago

in readme

The distribution comes with, in addition to the library, several test programs. While the core library is very portable, these programs have some additional dependencies. All of them require libjpeg, and two (quirc-demo and inspect) require SDL. The camera demos use Linux-specific APIs:

dlbeer commented 3 years ago

On Wed, Mar 24, 2021 at 07:00:48AM -0700, Ricardo JL Rufino wrote:

How do I disable libpng dependency on the project, I am trying to compile for an embedded platform and had many problems. After commenting on the qrtest.c methods related to png I managed to compile without this dependency.

It would be interesting to have a flag or something to disable this.

Hi Ricardo,

There is no libpng dependency for the library -- this is only used for the demo.

Be sure that you're trying to build only the library itself (the files in lib/) and you shouldn't run into any problems with lacking libpng.

Cheers, Daniel

-- Daniel Beer @.***> http://dlbeer.co.nz/ PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B

ricardojlrufino commented 3 years ago

Hi @dlbeer .. I was trying to run one of the examples (qrtest.c) and I was having this difficulty. Libpng seems to be very annoying to compile because it depends on zlib. Well at least for people who are not C.

I'm trying to make a QRCODE reader using an IP camera. https://github.com/roleoroleo/yi-hack-Allwinner/issues/268#issuecomment-806005370

dlbeer commented 3 years ago

On Wed, Mar 24, 2021 at 12:27:35PM -0700, Ricardo JL Rufino wrote:

Hi @dlbeer .. I was trying to run one of the examples (qrtest.c) and I was having this difficulty. Libpng seems to be very annoying to compile because it depends on zlib. Well at least for people who are not C.

I'm trying to make a QRCODE reader using an IP camera. https://github.com/roleoroleo/yi-hack-Allwinner/issues/268#issuecomment-806005370

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dlbeer/quirc/issues/98#issuecomment-806093802

In that case, the easiest way in the short time might be just to comment out the #include for the PNG header file, and the portions of the code that load PNG images (they should be easily separable).

-- Daniel Beer @.***> http://dlbeer.co.nz/ PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B

ricardojlrufino commented 3 years ago

thanks