Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate c static library problem #110

Open
irainbw opened this issue Jun 15, 2023 · 5 comments
Open

Generate c static library problem #110

irainbw opened this issue Jun 15, 2023 · 5 comments

Comments

@irainbw
Copy link

irainbw commented Jun 15, 2023

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
Copy link
Author

irainbw commented Jun 15, 2023

windows environment

@kornelski
Copy link
Member

which symbol can't be found?

@irainbw
Copy link
Author

irainbw commented Jul 7, 2023

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
Copy link
Member

kornelski commented Jul 7, 2023

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
Copy link
Author

irainbw commented Jul 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants