You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in cgo documentation i found "When the Go tool sees that one or more Go files use the special import "C", it will look for other non-Go files in the directory and compile them as part of the Go package. Any .c, .s, or .S files will be compiled with the C compiler. ...."
so i moved my c code from preamble to an external c file
What did you expect to see?
i expected that go build the program without problems, as happens when the code is in the preamble
What did you see instead?
but when i build it doesn't find (link) the functions in the external file
what am I doing wrong? or what I did not understand?
thanks in advance
The text was updated successfully, but these errors were encountered:
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?
in cgo documentation i found "When the Go tool sees that one or more Go files use the special import "C", it will look for other non-Go files in the directory and compile them as part of the Go package. Any .c, .s, or .S files will be compiled with the C compiler. ...."
so i moved my c code from preamble to an external c file
What did you expect to see?
i expected that go build the program without problems, as happens when the code is in the preamble
What did you see instead?
but when i build it doesn't find (link) the functions in the external file
what am I doing wrong? or what I did not understand?
thanks in advance
The text was updated successfully, but these errors were encountered: