Linking errors while building obs_studio

smd

New Member
I'm getting the follwing errors while building obs-studio with vs2013.Can anyone help me to solve it?

ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_strerror referenced in function _av_make_error_string
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_memdup referenced in function _create_video_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_rescale_q_rnd referenced in function _rescale_ts
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_get_default_channel_layout referenced in function _create_audio_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_dict_get referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_dict_count referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_dict_set referenced in function _create_audio_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_dict_parse_string referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_dict_free referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_init_packet referenced in function _ffmpeg_mux_packet
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avcodec_find_encoder referenced in function _new_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avcodec_descriptor_get_by_name referenced in function _new_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avio_open referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avio_close referenced in function _free_avformat
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_register_all referenced in function _ffmpeg_mux_init_internal
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avformat_free_context referenced in function _free_avformat
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avformat_new_stream referenced in function _new_stream
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avformat_alloc_output_context2 referenced in function _ffmpeg_mux_init_context
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _avformat_write_header referenced in function _open_output_file
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_interleaved_write_frame referenced in function _ffmpeg_mux_packet
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_write_trailer referenced in function _ffmpeg_mux_free
7>ffmpeg-mux.obj : error LNK2019: unresolved external symbol _av_guess_format referenced in function _ffmpeg_mux_init_context
7>D:\obs-studio\build\plugins\obs-ffmpeg\ffmpeg-mux\Debug\ffmpeg-mux32.exe : fatal error LNK1120: 22 unresolved externals
 
Hi, I had this problem myself but I got round it and couldn't remember what I'd done. I went back and checked and I think this problem happens when you choose the wrong compiler.

I had to delete the contents of my build directory and then restart cmake.

Choose the source directory again and add the variables for the DepsPath and QTDIR using the Add Entry button. I have the following, note they are pointing at 64 bit:

E:/obsbuild/deps/win64/include
E:/obsbuild/Qt/5.6/msvc2015_64

Then press Configure and in the drop down make sure you choose a Win64 compiler, I'm using Visual Studio 2015 so I chose "Visual Studio 14 2015 Win64" Press Finish.

Click the COPY_DEPENDENCIES checkbox and then hit Generate. Open up the Solution and try building again.

Hope that helps
 

eilenthil

New Member
looks like you are missing the FFMPEG dir path it can be set either in the CMakeLists.txt hard coded or when you run the cmake make build from command line.
if from command line cmake ..... -DFFmpegPath=<YOUR FFMPEG PATH>
if you edit the CMakeLists.txt its done by set (FFmpegPath <YOUR FFMPEG PATH>)
 
Top