x/tools/gopls: could not import C (no package for import C) when importing static libraries #40595
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm here from #35721 since it seems this particular case is not the same issue. Trying to import a static library using "import C" gives a "could not import C (no package for import C)" in vscode, the code however, can compile and run with no problems with go build.
sample go code:
sample .h code:
libdoecho.a is a library wich exposes the "doecho" and "freeThePointer" functions. A string enters and a string is returned.
What did you expect to see?
import C should not give the "could not import C (no package for import C)" error on vscode, since the code does compile and run without problems with go build.
What did you see instead?
A "could not import C (no package for import C)" error.
The text was updated successfully, but these errors were encountered: