Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8830953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:12:23+00:00 2026-06-14T08:12:23+00:00

I have downloaded and installed the ffmpeg library. I want to use it for

  • 0

I have downloaded and installed the ffmpeg library. I want to use it for reading the separate frames of different videos and manipulate them. For that I tried to follow some tutorial from here: http://dranger.com/ffmpeg/tutorial01.html
But I can’t compile my cpp file since I get the following compilation:

Undefined symbols for architecture x86_64:
  "av_register_all()", referenced from:
      _main in cc9zyUBe.o
      _main in ccRz35d4.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

When I was installing ffmpeg library, I used arch=x86_64 option in ./configure step.
I use OS X Mountain Lion 10.8.2 and gcc 4.2 compiler.
Does somebody have any clue what can be the reason of this error?
Thanks in advance.

UPDATE:
I’ve already tried many different install options, with static libraries, shared libraries, with/without –arch=x86_64 option. Also installed it with homebrew, result remains the same. Library isn’t recognized. But ffmpeg binary works pretty well, when I use it as a command-line tool.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:12:24+00:00Added an answer on June 14, 2026 at 8:12 am

    Finally I have managed to compile my program which uses ffmpeg library.

    For some reason I still couldn’t compile it using gcc compiler, but I could do it with g++ compiler.

    When the static libraries are installed, all the dependencies must be specified explicitly, and the order of linking of these libraries is also important. So here is the compilation code which finally compiled my program:

    g++ readVideo.cc -o readVideo $(pkg-config --libs --cflags libavformat)
    

    pkg-config here is a utility which prints all the flags and libraries that are needed to properly link the specified libavformat library.

    Also it’s worth of mentioning, that the source file was renamed from readVideo.C to readVideo.cc, and that #include statements have been encompassed using extern "C" as follows:

    extern "C" {
      #include <libavformat/avformat.h>
    }
    

    It is needed because ffmpeg is a C project and program will not compile with C++ compiler if you don’t explicitly state that it is C library.

    And if you don’t want to bother with pkg-config to include all dependencies for ffmpeg libraries, you can install ffmpeg with shared libraries instead of static ones. Then it will compile by simpler call:

    g++ readVideo.cc -o readVideo -lavformat
    

    To install shared libraries, you need to add these 2 options to ./configure program when installing ffmpeg:

    --disable-static --enable-shared
    

    Hope it helps somebody some time …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that needs branding when downloaded in certain continents. When installed
I have downloaded and installed Erlang and EmacsW32 . But how do I use
I want to install wordpress on localhost I have downloaded and installed XAMPP .
Hi guys i have downloaded iPhone SDK 3.2 and installed it successfully, after that
I have downloaded and installed ActivePerl on my Windows 7-64 machine. Everything went smooth,
I have downloaded and installed the RC version of the VS2012 VS2012_RC_ULT_ENU.iso . Now,
I have downloaded and installed OpenCart v1.5.2.1. Now I'm using the default template in
I have downloaded the current version of Db4Objects (7.4) and installed it. It appears
I have downloaded, compiled and installed so far: apr-1.3.9 apr-util-1.3.9 sqlite-3.6.23 zlib-1.2.4 libtool-2.2.6b Now
I have download and installed Visual Studio 2010 RC and I want to develop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.