error LNK2001: unresolved external symbol _av_pix_fmt_descri

For the developers that use FFmpeg in their software.
Post Reply
jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

error LNK2001: unresolved external symbol _av_pix_fmt_descri

Post by jiapei100 »

Hi, all:

First, my environment:
Windows 7 + Visual Studio 2010 + libav 0.8.3 Release.

Before the final success, I got this final error:
error LNK2001: unresolved external symbol _av_pix_fmt_descriptors
It seems the solution can be found at
http://ffmpeg.arrozcru.org/forum/viewto ... f=8&t=1514
You can hack the headers and put __declspec(dllimport) before the variable. Its size is PIX_FMT_NB if I recall correctly.
Well, the detailed solutions can be found at
http://code.google.com/r/souranil-javac ... dd69b971b1
#ifdef _WIN32
#undef av_pix_fmt_descriptors
__declspec(dllimport) extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
...
However, I strictly followed this solution, but still got an additional error:
error C2370: 'av_pix_fmt_descriptors' : redefinition; different storage class


Cheers
Pei

rogerdpack
Posts: 1882
Joined: Fri Aug 05, 2011 9:56 pm

Re: error LNK2001: unresolved external symbol _av_pix_fmt_de

Post by rogerdpack »

I wonder if (ffmpeg itself) it needs to be compiled with those directives, as well...

jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: error LNK2001: unresolved external symbol _av_pix_fmt_de

Post by jiapei100 »

Unfortunately, tested both libav-git and ffmpeg-git today.
Both failed under Visual Studio 2010....

Sigh....

Take a rest first...

Cheers
Pei
Last edited by jiapei100 on Tue Aug 14, 2012 10:29 pm, edited 1 time in total.

rogerdpack
Posts: 1882
Joined: Fri Aug 05, 2011 9:56 pm

Re: error LNK2001: unresolved external symbol _av_pix_fmt_de

Post by rogerdpack »

no I was referring to you compiling a custom ffmpeg with those changes in place...

Post Reply