-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cgo: consider supporting simple variable substitution in #cgo lines #7891
Labels
Milestone
Comments
Comment 1 by manoj.dayaram@moovweb.com: That would certainly help with this issue! https://golang.org/issue/5428 |
I don't see the problem happening at tip. On OSX 10.9 I have successfully linked a program with local libraries in a lib directory and the cgo directive: // #cgo LDFLAGS: -Llib -lsomelibrary The output of go build -x --ldflags -v shows that the files in the build directory are referenced by absolute path, and the source directory appears to be the working directory, so relative paths seem to work. |
Comment 4 by manoj.dayaram@moovweb.com: The issue only arises if you're running the build command outside of the directory using the library and if the path in the #cgo line is a relative path but *not* the same directory as the code using it. I made fairly detailed instructions on replicating this process on this issue: https://golang.org/issue/5428 |
CL https://golang.org/cl/114640044 mentions this issue. |
Gerrit CL: https://go-review.googlesource.com/#/c/1756/ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: