srs-librtmp
srs-librtmp copied to clipboard
cgo srs_librtmp.h
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)