Author Topic: undefined reference to .. linking ffmpeg libraries  (Read 6910 times)

forums_mp

  • Guest
undefined reference to .. linking ffmpeg libraries
« 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


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: undefined reference to .. linking ffmpeg libraries
« Reply #1 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.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org