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

cgo srs_librtmp.h #16

Open
moneyzmey opened this issue Jan 31, 2018 · 0 comments
Open

cgo srs_librtmp.h #16

moneyzmey opened this issue Jan 31, 2018 · 0 comments

Comments

@moneyzmey
Copy link

Hi, is it possible use your lib, with cgo ?

Actually i have a problem with it.

code sample:

package main

/*
#include "srs_librtmp.h"
*/
import "C"

func test(){
	var url *C.char = C.CString("rtmp://a.rtmp.youtube.com/live2")

	r:= C.srs_rtmp_create(url)
	C.srs_rtmp_handshake(r)

}

func main(){
	test()
}

output:

# command-line-arguments
Undefined symbols for architecture x86_64:
  "_srs_rtmp_create", referenced from:
      __cgo_c2568fdecd5f_Cfunc_srs_rtmp_create in main.cgo2.o
     (maybe you meant: __cgo_c2568fdecd5f_Cfunc_srs_rtmp_create)
  "_srs_rtmp_handshake", referenced from:
      __cgo_c2568fdecd5f_Cfunc_srs_rtmp_handshake in main.cgo2.o
     (maybe you meant: __cgo_c2568fdecd5f_Cfunc_srs_rtmp_handshake)
ld: symbol(s) not found for architecture x86_64
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