Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with vendored dependencies fails #49

Closed
ctarsjp opened this issue Jul 22, 2024 · 2 comments · Fixed by #54
Closed

Build with vendored dependencies fails #49

ctarsjp opened this issue Jul 22, 2024 · 2 comments · Fixed by #54

Comments

@ctarsjp
Copy link

ctarsjp commented Jul 22, 2024

Trying to build the example as go module with vendored dependencies. Build fails with the following error:

> go build
# github.com/webview/webview_go
vendor\github.com\webview\webview_go\webview.go:17:10: fatal error: 'webview.h' file not found
   17 | #include "webview.h"
      |          ^~~~~~~~~~~
1 error generated.

OS is Windows 11, but I don't think it's OS-dependent.

Go version is 1.22.5.

Copying libs directory to vendor/github.com/webview/webview_go solves the issue.

@ctarsjp
Copy link
Author

ctarsjp commented Jul 22, 2024

I believe that this is the same issue.

@SteffenL
Copy link
Contributor

SteffenL commented Aug 6, 2024

It has been so long since I explored this so I don't quite remember; however, last time I worked on this, this use case was not well supported in Go/cgo. If I recall correctly, I sort of got vendoring to work by adding dummy *.go files in the folders that had non-go files.

Can you imagine better solutions?

@SteffenL SteffenL linked a pull request Aug 31, 2024 that will close this issue
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 a pull request may close this issue.

2 participants