[Libav-user] Configuration from shared library?

Karel Vorechovsky k.vorechovsky at gmail.com
Sun Jan 1 20:55:30 EET 2017


Dne 1.1.2017 v 19:45 Charles napsal(a):
> On 01/01/2017 12:29 PM, Steve Myers wrote:
>> Due to circumstances I lost the build script I used to build the 
>> shared libraries for my app. Is there a way a to get the 
>> configuration used from shared libraries similar to the command line 
>> ffmpeg? I only have libavcodec-57.so, libavformat-57.so, etc.
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>
> No, but if using gcc it would look something like this
> gcc -fPIC -shared -I[path] [files].c -o lib[name].so -l[other required 
> lib]
>
> If you build it look for errors in compile "name.h" not found means 
> update include "-I" path
> Unresolved symbols mean update linking options "-l"
>
> ex: shared lib with ffmpeg would include something like this
> -I/usr/include/ffmpeg
> -lavformat -lavcodec -lavutil -lswscale -lavdevice"
>
> Example:
> g++ -g -std=c++0x -Wall -Wextra -shared -fPIC -DDEBUG 
> -DGL_GLEXT_PROTOTYPES -I/usr/include/libdrm -I/usr/include/ffmpeg 
> draw_inf.cpp draw_mbox.cpp sphere.cpp draw_cube.cpp util.cpp 
> AvEncoder.cpp ThreadBase.cpp Image.cpp -lavformat -lavcodec -lavutil 
> -lswscale -lavdevice -lGLEW -lGLU -lGL -lX11 -lm -lrt -o libmyutil.so
>
> Thanks
> cco
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
you can use:
/**
  * Return the libavformat build-time configuration.
  */
const char *avformat_configuration(void);

and it's sister from avcodec.

-- 
Regards,
Karel Vořechovský



More information about the Libav-user mailing list