News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

undefined reference to .. linking ffmpeg libraries

Started by forums_mp, March 25, 2011, 02:30:13 AM

Previous topic - Next topic

forums_mp


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


stahta01

Quote from: forums_mp on March 25, 2011, 02:30:13 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

swscale.lib
avcodec.lib
avdevice.lib
avformat.lib
avutil.lib


And under Linker search folders put path to the libraries


..\..\..\..\..\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.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]