Hi,
I am working on some code which uses ffmpeg sourcecode. To compile it I use
Code:
g++ -g -O3 -Wall -g -I. -I./ -I./libavcodec -I./libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o output_example.o output_example.cpp
g++ -Wl,--warn-common -rdynamic -g -o output_example output_example.o -L./libavformat -lavformat -L./libavcodec -lavcodec -lm -lz -ldl robovision.o -ljpeg
I seriously do not know what it all means, but I am compiling my code(robovision.cpp,robovision.h and output_example.cpp) by putting it in the directory containing the sourcecode of ffmpeg-0.4.8. This means that inspite of my code being only 3 files, I have to mess up with a thousand more files...
The only place where ffmpeg is used is in output_example.cpp
Code:
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <math.h>
#include <string.h>
#include <time.h>
#ifndef M_PI
#define M_PI 3.1415926535897931
#endif
#include "libavformat/avformat.h"
#include "robovision.h"
/* 10 FPS */
#define STREAM_FRAME_RATE 10
/*..... and so on.......*/
When I checked my system for ffmpeg.. it had ffmpeg-0.4.9-0.2.20050427.2.fc4 installed already. Can I do something to use the library installed in the system and thus reduce the mess in which I am. Please reply asap.
Regards,
Unpredictable.