Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: forums_mp on March 25, 2011, 02:30:13 am

Title: undefined reference to .. linking ffmpeg libraries
Post by: forums_mp on March 25, 2011, 02:30:13 am

I'm getting 'reference to .... ' (ex: 'Undefined reference to av_free_packet') when the linker attempts to link ffmpeg libraries.

My approach is as follows:
 
Project Settings -> Build Options -> Linker Settings

Link Libraries
..\..\..\..\..\ffmpeg-shared-lib-64\lib\swscale.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avcodec.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avdevice.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avformat.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avutil.lib


Ideas, help welcomed.  Thanks

Title: Re: undefined reference to .. linking ffmpeg libraries
Post by: stahta01 on March 25, 2011, 02:47:35 am
Link Libraries
..\..\..\..\..\ffmpeg-shared-lib-64\lib\swscale.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avcodec.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avdevice.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avformat.lib
..\..\..\..\..\ffmpeg-shared-lib-64\lib\avutil.lib

Try instead
Link Libraries
Code
swscale.lib
avcodec.lib
avdevice.lib
avformat.lib
avutil.lib

And under Linker search folders put path to the libraries

Code
..\..\..\..\..\ffmpeg-shared-lib-64\lib

Turn on FULL Compiler logging to see what Code::Blocks sends the compiler
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Tim S.