stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

Add enum type to sd_type_t

Open drasticactions opened this issue 1 year ago • 1 comments

When building the stable-diffusion.h C headers, I get an error complaining about a missing enum type in the convert method

/home/drasticactions/Development/NativeBindings/library/stable-diffusion/stable-diffusion.h:198:92: error: must use 'enum' tag to refer to type 'sd_type_t'
thread 'main' panicked at src/main.rs:4:21:
called `Result::unwrap()` on an `Err` value: ClangDiagnostic("/home/drasticactions/Development/NativeBindings/library/stable-diffusion/stable-diffusion.h:198:92: error: must use 'enum' tag to refer to type 'sd_type_t'\n")

Adding the type fixes the error, and I think it should work with different compilers.

drasticactions avatar Jun 21 '24 08:06 drasticactions

Yep I had to add the keyword as well when I tried linking from a C program, could it not also be const?

grauho avatar Jul 24 '24 11:07 grauho

Thank you for your contribution.

leejet avatar Aug 27 '24 15:08 leejet