openfresh / gosrt

Go SRT library with the net package like API.
MIT License
66 stars 16 forks source link

Where to put SRT C library? #15

Closed ivanjaros closed 3 years ago

ivanjaros commented 3 years ago

In the source code I see imports of "srt/srt.h" but there is no such file. If I look at https://github.com/Haivision/srt/blob/master/srtcore/srt.h, which I think is what this is pointing to, the directory structure is different(ie, no "srt" directory in that repo, insted there is "srtcore"). So where should I copy the C library or how should I structure my code?

(I don't use cgo, ever, but i need srt so i don't have much choice).

thmatuza commented 3 years ago

If you follow the Readme on srt repository and install it, header files will be located on /usr/local, so CGO can recognize it. https://github.com/Haivision/srt#for-linux You may need to set LD_LIBRARY_PATH.

The Dockerfile may be helpful to understand it. https://github.com/openfresh/gosrt/blob/master/Dockerfile

ivanjaros commented 3 years ago

im on windows, do i just git-pull the srtcore directory?

thmatuza commented 3 years ago

I am sorry that I have never used Go in windows, I cannot give you much advice. I guess you need to download strcore into srt folder under this repository root folder.

ivanjaros commented 3 years ago

ok, thanks anyway.

ivanjaros commented 3 years ago

@thmatuza I am guessing the /conf has the // +build darwin dragonfly freebsd linux netbsd openbsd solaris on purpose or ....just because?

ivanjaros commented 3 years ago

nevermind, the headache is just not worth it.