libvips / build-win64-mxe

79 stars 15 forks source link

Unable to locate program input point inflatevalidate in DLL. #27

Closed Zhaoyazhou1996 closed 3 years ago

Zhaoyazhou1996 commented 3 years ago

Hi, I am trying to test the 32-bit binary of libvips, But when I run a simple test program, I encounter a problem as shown in the figure: error The code I tested is as follows:

#include <stdio.h>
#include <vips/vips.h>
#include <Windows.h> 

int main(void)
{
    char* filePath = "D:\\test\\30203b.tif";
    VipsImage* image;

    if (VIPS_INIT(filePath))
        vips_error_exit(NULL);

    if (!(image = vips_image_new_from_file(filePath, NULL)))
        vips_error_exit(NULL);
    g_object_unref(image);
    getchar();
    return(0);
}

Is this a known issue? Am I doing something wrong? Best regards!

kleisauke commented 3 years ago

The inflateValidate symbol originates from zlib (libz.dll), so perhaps there's a conflicting DLL file in your PATH environment variable? There are a few things you could try:

Zhaoyazhou1996 commented 3 years ago

Thank you for your excellent comment! I reorder my PATH environment and search libz.dll in C: and D disk, and deleted the redundant libz.dll. My program can run normally now. Thank you again!