Skip to content

z-cam libssp example not working #12

@sriyan983

Description

@sriyan983

I downloaded the source code and created a build folder inside the examples and ran the following command,

g++ ../libssp_test.cpp -std=c++11 -L../../lib/linux_x64/ -lssp -lpthread -I../../include/ -I../../include/libuv/include/ -lrt -o libssp_test

ERROR

/usr/bin/ld: cannot find -lssp


Environment,
Ubuntu 16.04
gcc compiler verison is 5.4.0

Kind of urgent can you help resolve this?

I tried to remove -lssp and got this,

g++ ../libssp_test.cpp -std=c++11 -L../../lib/linux_x64/ -lpthread -I../../include/ -I../../include/libuv/include/ -lrt -o libssp_test

ERROR:

../libssp_test.cpp: In function ‘void on_264_1(imf::SspH264Data*)’:
../libssp_test.cpp:24:91: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
264 [%d] [%lld] [%d] [%d]\n", h264->frm_no, h264->pts, h264->type, h264->len);
^
../libssp_test.cpp:24:91: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
../libssp_test.cpp: In function ‘void on_264_2(imf::SspH264Data*)’:
../libssp_test.cpp:29:91: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
264 [%d] [%lld] [%d] [%d]\n", h264->frm_no, h264->pts, h264->type, h264->len);
^
../libssp_test.cpp:29:91: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
/tmp/ccY7iUs4.o: In function setup(imf::Loop*)': libssp_test.cpp:(.text+0x287): undefined reference to imf::SspClient::SspClient(std::string const&, imf::Loop*, unsigned long, unsigned short, unsigned int)'
libssp_test.cpp:(.text+0x29d): undefined reference to imf::SspClient::init()' libssp_test.cpp:(.text+0x2e8): undefined reference to imf::SspClient::setOnH264DataCallback(std::function<void (imf::SspH264Data*)> const&)'
libssp_test.cpp:(.text+0x347): undefined reference to imf::SspClient::setOnMetaCallback(std::function<void (imf::SspVideoMeta*, imf::SspAudioMeta*, imf::SspMeta*)> const&)' libssp_test.cpp:(.text+0x393): undefined reference to imf::SspClient::setOnDisconnectedCallback(std::function<void ()> const&)'
libssp_test.cpp:(.text+0x3e4): undefined reference to imf::SspClient::setOnAudioDataCallback(std::function<void (imf::SspAudioData*)> const&)' libssp_test.cpp:(.text+0x3ff): undefined reference to imf::SspClient::start()'
/tmp/ccY7iUs4.o: In function imf::ThreadLoop::~ThreadLoop()': libssp_test.cpp:(.text._ZN3imf10ThreadLoopD2Ev[_ZN3imf10ThreadLoopD5Ev]+0x2c): undefined reference to imf::Loop::quit()'
/tmp/ccY7iUs4.o: In function imf::ThreadLoop::run()': libssp_test.cpp:(.text._ZN3imf10ThreadLoop3runEv[_ZN3imf10ThreadLoop3runEv]+0x20): undefined reference to imf::Loop::Loop()'
libssp_test.cpp:(.text._ZN3imf10ThreadLoop3runEv[_ZN3imf10ThreadLoop3runEv]+0x4b): undefined reference to imf::Loop::init()' libssp_test.cpp:(.text._ZN3imf10ThreadLoop3runEv[_ZN3imf10ThreadLoop3runEv]+0x95): undefined reference to imf::Loop::loop()'
/tmp/ccY7iUs4.o: In function std::default_delete<imf::Loop>::operator()(imf::Loop*) const': libssp_test.cpp:(.text._ZNKSt14default_deleteIN3imf4LoopEEclEPS1_[_ZNKSt14default_deleteIN3imf4LoopEEclEPS1_]+0x1e): undefined reference to imf::Loop::~Loop()'
collect2: error: ld returned 1 exit status


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions