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

running c++ failed: exit status 1 #69

Open
QU35T-code opened this issue Sep 12, 2023 · 0 comments
Open

running c++ failed: exit status 1 #69

QU35T-code opened this issue Sep 12, 2023 · 0 comments

Comments

@QU35T-code
Copy link

  • Mac M2 ARM
  • go version go1.21.0 darwin/arm64

go get -u github.com/mysteriumnetwork/go-openvpn

if _, err := os.Stat(vpnFileParam); os.IsNotExist(err) {
			fmt.Println("The file does not exist :", vpnFileParam)
			os.Exit(1)
		}
		bytes, err := os.ReadFile(vpnFileParam)
		if err != nil {
			log.Fatal(err.Error())
		}
		config := openvpn3.NewConfig(string(bytes))
		session := openvpn3.NewSession(config, openvpn3.UserCredentials{}, &loggingCallbacks{})
		session.Start()
		err = session.Wait()
		if err != nil {
			fmt.Println("Openvpn3 error: ", err)
		} else {
			fmt.Println("Graceful exit")
		}
}
/opt/homebrew/Cellar/go/1.21.0/libexec/pkg/tool/darwin_arm64/link: running c++ failed: exit status 1
ld: Undefined symbols:
  _check_library, referenced from:
      __cgo_c835f25f288e_Cfunc_check_library in 000002.o
  _cleanup_session, referenced from:
      __cgo_c835f25f288e_Cfunc_cleanup_session in 000005.o
  _new_session, referenced from:
      __cgo_c835f25f288e_C2func_new_session in 000005.o
      __cgo_c835f25f288e_Cfunc_new_session in 000005.o
  _reconnect_session, referenced from:
      __cgo_c835f25f288e_Cfunc_reconnect_session in 000005.o
  _start_session, referenced from:
      __cgo_c835f25f288e_C2func_start_session in 000005.o
      __cgo_c835f25f288e_Cfunc_start_session in 000005.o
  _stop_session, referenced from:
      __cgo_c835f25f288e_Cfunc_stop_session in 000005.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
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

1 participant