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

Windows: callback.go:8:10: fatal error: curl/curl.h: No such file or directory #82

Open
BaseMax opened this issue Sep 2, 2022 · 2 comments

Comments

@BaseMax
Copy link

BaseMax commented Sep 2, 2022

Hi there, I am trying to build/run our program on a Windows Laptop machine.

go run main.go provider.go

# github.com/andelf/go-curl
..\go\pkg\mod\github.com\andelf\[email protected]\callback.go:8:10: fatal error: curl/curl.h: No such file or directory
    8 | #include <curl/curl.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

go build .

# github.com/andelf/go-curl
..\go\pkg\mod\github.com\andelf\[email protected]\callback.go:8:10: fatal error: curl/curl.h: No such file or directory
    8 | #include <curl/curl.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
@hkey0
Copy link

hkey0 commented Sep 14, 2023

Same error for me.

@sprive
Copy link
Contributor

sprive commented Jul 7, 2024

Hi. I'm just a user of go-curl, and I am not on Windows currently.. but try defining the ENV var CURL_GIT_PATH to be where-ever your source dir for CURL is located.

You might need to play with the path or path format some (add some prints to see what paths it's attempting). I don't remember much about how Windows and UNIX paths translate.

Worst case, I see in the code that IF CURL_GIT_PATH "is NOT" defined, then it will simply look for a curl directory just underneath go-curl (and then below, you see it looks in the curl-git-repo/include/curl). For this I'd probably just copy your curl repo into go-curl (then maybe remove the copied dir, afterwards)

target_dirs = [
'{}/include/curl'.format(CURL_GIT_PATH),
'/usr/local/include',
'libdir/gcc/target/version/include'
'/usr/target/include',
'/usr/include',
]

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

No branches or pull requests

3 participants