sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 347 forks source link

Undefined reference to scy::av::AVPacketEncoder #82

Closed Pwera closed 8 years ago

Pwera commented 8 years ago

in CMakeLists.txt: target_link_libraries(untitled2 ${Boost_LIBRARIES} scy_base scy_crypto scy_net scy_http scy_media scy_util scy_archo scy_socketio scy_turn ${FFmpeg_LIBRARIES} rtaudio avcodec asound libuv crypto http_parser postproc avdevice-ffmpeg swscale avcodec-ffmpeg avdevice avformat-ffmpeg avutil avformat avfilter avcodec swscale-ffmpeg postproc-ffmpeg postproc-ffmpeg avutil-ffmpeg avresample-ffmpeg swresample-ffmpeg avfilter-ffmpeg swresample minizip z pthread)

MakeFiles/untitled2.dir/main.cpp.o: In function MPEGResponder::MPEGResponder(scy::http::ServerConnection&)': /home/pwera/untiitled2/Newros/src/SourceyEx/CryptoEx.hpp:61: undefined reference to scy::av::AVPacketEncoder::AVPacketEncoder(scy::av::EncoderOptions const&, bool)' collect2: error: ld returned 1 exit status

When i copied all cmake modules (which comes from libsourcey folder) to /usr/share/cmake-3.2/Modules and add find_package(FFmpeg REQUIRED) in CMakeLists.txt i got Error:Unknown CMake command "set_module_notfound".

Sorry for my poor english :P

auscaster commented 8 years ago

Hmm ... I'm out today, are you able to submit a PR for this? It may be just a matter of including scy/media/avpacketencoder.h in the MPEGResponder file

Pwera commented 8 years ago

https://gist.github.com/Pic14kk/b4d61207df61254a0ce8

auscaster commented 8 years ago

Hey there, it looks like you're not including LibSourcey the right way, just add the following to your linker libraries: scybase scyuv scymedia scyutil, and add the libsourcey include directory, and you're good to go.

I'm going to close this one since it's not actually a bug.