Active Topics

 


Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1
Hi
I'm trying to learn libavcodec and I got the following error while compiling

Code:
marcin@marcin:~/proj/test$ g++ -o test main.cpp -lavformat -lavcodec -ldts -lz
In file included from /usr/include/libavutil/avutil.h:81:0,
                 from /usr/include/libavcodec/avcodec.h:30,
                 from main.cpp:3:
/usr/include/libavutil/common.h: In function ‘int32_t av_clipl_int32(int64_t)’:
/usr/include/libavutil/common.h:154:47: error: ‘UINT64_C’ was not declared in this scope
The code is very simple:

Code:
#include <iostream>
#include <string>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
using namespace std;

int main()
{
    av_register_all();
    return 0;
}
How can I fix it?
Thanks in advance
 
Posts: 560 | Thanked: 422 times | Joined on Mar 2011
#2
Off the top of my head, just check all the libraries and h files are where they're supposed to be and that they get compiled in the right order. I might be wrong but it might be a type problem you could also hard code what you want UINT_64C to represent with a hash-define in the first object to get defined - not ideal but it might weed out what's really the problem.
If it's an object of type UINT_64C that's gone out of scope then again, make sure the obj files are compiling in the right order
As you maybe able to tell I haven't tried this myself - it's just a stab.

The normal procedure is to assume one's own code is at fault until proven otherwise but seeing as you don't have much code to go wrong, it must be in the setup.

Good luck...

Last edited by demolition; 2011-10-24 at 16:51.
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#3
I've installed libavcodec and libavcodec-dev.
from ubuntu 11.04 repositories
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:59.