Skip to content

Conversation

drasticactions
Copy link
Contributor

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.

Copy link
Contributor

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes C needs the enum keyword.

@grauho
Copy link
Contributor

grauho commented Jul 24, 2024

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

@leejet leejet merged commit 353ee93 into leejet:master Aug 27, 2024
9 checks passed
@leejet
Copy link
Owner

leejet commented Aug 27, 2024

Thank you for your contribution.

stduhpf pushed a commit to stduhpf/stable-diffusion.cpp that referenced this pull request Nov 1, 2024
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

Successfully merging this pull request may close these issues.

4 participants