google / guetzli

Perceptual JPEG encoder
Apache License 2.0
12.9k stars 977 forks source link

Linker Tools Errors please help #254

Open koboltzz opened 5 years ago

koboltzz commented 5 years ago

Hi everybody,

since at the end of year 2018 guetzli is still a incredible good tool to compress images I decided to compile windows binaries. I use Win7+Visual Studio 2015+followed the steps closely. But no matter what I do, I can not point the project to use C:\vcpkg\packages\ as additional lib since I always get the missing "png.h" error. When I copy this file to guetzli dir I get this error instead:

LNK2019 unresolved external symbol png_create_read_struct referenced in function "bool __cdecl `anonymous namespace'::ReadPNG(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int *,int *,class std::vector<unsigned char,class std::allocator<unsigned char> > *)" (?ReadPNG@?A0x1b7a9cb8@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAH1PEAV?$vector@EV?$allocator@E@std@@@3@@Z) guetzli C:\guetzli\guetzli.obj 1 Can somebody help me?

mrundle commented 5 years ago

I'm running into the same thing. I'm completely unaccustomed to Windows development but want to use this tool to create a small program for a family member.

If I figure it out I'll comment here.

koboltzz commented 5 years ago

I found the solution :) The instructions are wrong. You don't need libpng... You need libpng 64bit. Look at the vckpg documentary to install 64 bit libraries and you can build it. I have to say sadly, opencl and Cuda only works till ~5 Megapixel pictures. Anything bigger results in error messages. But the '-c' command of the Cuda version Really works.