Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

When run examples/ch2.1/hello-03/main.go , an error occurred #598

Open
Assignees
Labels
@cag2050

Description

Description of problem

when run https://github.com/chai2010/advanced-go-programming-book/blob/master/examples/ch2.1/hello-03/main.go, an error occurred:

GOROOT=/usr/local/go #gosetup
GOPATH=/Users/cag2050/go #gosetup
/usr/local/go/bin/go build -o /private/var/folders/bs/c1rv5w6n0cn77fp62sj3hzhh0000gp/T/GoLand/___5go_build_main_go /Users/cag2050/Documents/GoLandProjects/advanced-go-programming-book/examples/ch2.1/hello-03/main.go #gosetup
# command-line-arguments
Undefined symbols for architecture x86_64:
 "_SayHello", referenced from:
 __cgo_42939a32e160_Cfunc_SayHello in _x002.o
 (maybe you meant: __cgo_42939a32e160_Cfunc_SayHello)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected result

do not have error

Actual result

Further information

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /