Skip to content

Problem: The Go binding failed to compile because uint32_t was undefined on Windows. #4

Description

@Liebenfiels

Thank you very good library
I had issue with GO build as there were some errors, eventually LLM figure out to add below fix to library as in my case it was not working during go build
I was also using this MinGW-W64-binaries
I normally use in Python but needed for speed to try GOlang that I just learn
I do not claim it is problem at library end- just fixed my issue and LLM stated
"This allowed the Go compiler to understand the types (uint32_t) and build the Go bindings."

Fix:
openslide_go.h
#include <stdint.h> // Added to fix uint32_t
#include <openslide.h> // Already needed
char * str_at(char ** p, int i);
void argb2rgba(uint32_t *buf, int len);

Final fix (this is the one that matters)
Modify the top of openslide_go.c to this:
#include <stdint.h> // <-- ADD THIS LINE
#include <stdio.h>
#include <stdlib.h>
#include "openslide_go.h" // <-- use quotes, not <>

Thank you once again
Liebenfiels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions