linking error from vs2008

For the developers that use FFmpeg in their software.
Post Reply
shlee7708
Posts: 3
Joined: Wed Feb 08, 2012 8:32 am

linking error from vs2008

Post by shlee7708 » Wed Feb 08, 2012 12:21 pm

hello.

i builded ffmpeg 0.9.1 .

i want to build my project using ffmpeg library.
so i added libwinpthread.a libgcc.a libmingwex.a libavdevice.a libavformat.a libavfilter.a libavcodec.a libswscale.a WS2_32.Lib libavutil.a.

but i can't build my project, linking error.....

help me.....

error message is

1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _longjmp already defined in libmingwex.a(lib32_libmingwex_a-mingw_getsp.o)
1>libmingwex.a(lib32_libmingwex_a-sqrtf.o) : error LNK2019: unresolved external symbol ___mingw_raise_matherr referenced in function _sqrtf
1>libmingwex.a(lib32_libmingwex_a-mingw_output_format.o) : error LNK2019: unresolved external symbol ___mingw_get_msvcrt_handle referenced in function ___mingw_set_output_format
1>libmingwex.a(lib32_libmingwex_a-mingw_get_codepage.o) : error LNK2001: unresolved external symbol ___mingw_get_msvcrt_handle
1>D:\Temp\ffmpeg_test1\Debug\ffmpeg_test.exe : fatal error LNK1120: 2 unresolved externals

Vladimir
Posts: 29
Joined: Tue Sep 27, 2011 1:15 pm

Re: linking error from vs2008

Post by Vladimir » Fri Feb 10, 2012 6:06 am

Try to perform more experiments with the link line.
Order of libraries matters with static linking.
Also make sure, you've surrounded libav headers with

Code: Select all

extern "C" {

}

Post Reply
'