'how to integrate fairplay license sdk by using golang?
I have downloaded FairPlay Streaming Server SDK, but it is written by C++, and I use golang as programming language, how can I integrate it? Thanks for your help.
Solution 1:[1]
You would need to write a wrapper in C, from which you can call your C++ SDK.
(example here)
Then using cgo, you can compile, linking to your SDK library.
See a concrete example in "Linking Dynamic C++ Libraries with Go" from Brand Aaron Taylor
Specifying the location of this file requires custom flags for the compiler command.
With a bit of searching I was able to find the-Lflag, which, similarly to the-Iflag, specifies a search directory for the compilation process as a whole.By specifying both Drafter’s build directory and dynamic library itself, we had a compiling C program!
gcc ctest.o -L./drafter/build/out/Release/ -ldrafter -o ctest
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | VonC |
