ImageOptim / libimagequant

Palette quantization library that powers pngquant and other PNG optimizers
https://pngquant.org/lib
Other
780 stars 132 forks source link

Generate c static library problem #110

Open irainbw opened 1 year ago

irainbw commented 1 year ago

I have generated the imagequant sys.lib static library file under target\release. When I import the static library file into the project, it compiles successfully, but it prompts that the function symbol cannot be found, and the project configuration is release win32. How to solve

irainbw commented 1 year ago

windows environment

kornelski commented 1 year ago

which symbol can't be found?

irainbw commented 1 year ago

which symbol can't be found?

liq_image_destroy liq_result_destroy liq_write_remapped_image liq_image_create_rgba liq_attr_destroy liq_attr_create liq_get_palette liq_image_quantize liq_set_dithering_level

According to the readme, I generated the imagequant sys.lib file, and I have added it to VS. The above links compile with errors

kornelski commented 1 year ago

If none of the symbols can be found, there must be something wrong with your linking configuration. I'm certain these symbols are exported, so make sure the static library is added to linking of every binary product you're compiling. Also note that you can't link one static library with another, so if you're creating libraries internally you'll need to link with imagequant explicitly at the end.

irainbw commented 1 year ago

If none of the symbols can be found, there must be something wrong with your linking configuration. I'm certain these symbols are exported, so make sure the static library is added to linking of every binary product you're compiling. Also note that you can't link one static library with another, so if you're creating libraries internally you'll need to link with imagequant explicitly at the end.

I want to confirm whether imagequant_sys.lib is generated in the target/release directory and add it to additional dependencies 82JJ)GCP21MDO9{S5H3K1PB