Le 10 oct. 2009 à 13:53, Russell Edwards a écrit :

Hello Everyone.

I'm sure that this question has been asked many times so my apologies
if i'm going over old ground.

I'm trying to develop a specialist one-off media player for Mac OS X and
Windows. I'm doing my main development on OS X 10.5.8.

I'm a fairly proficient programmer but much of my work of done using xcode with java or Qt (which has an automatic installer) so the full procedure for
installing things via the command line is a little alien.

I have followed the process for installing FFmpeg as given on the main
documents page. and have set the following flags when running configure.

        --enable-shared
        --enable-static
        --enable-libmp3lame
        --enable-libfaac
        --enable-libfaad
        --disable-mmx
        --arch=x86_64
        --enable-gpl
        --enable-nonfree

The header files are located in /usr/local/include/libxxxx/xxxx.h
and calling ffmpeg -h gives me the help file, so it has been included in my
path

I have written a simple c file that just makes a call to av_register_all and this fails to compile. Initially it failed because gcc couldn't find the header files both with and without the -lavcodec and -lavformat flags given in Martin
Bohme's example.

This suggests that the install didn't complete properly as
the directories haven't been added to gcc's search path.


Not a surprise as -l flags (lower case L) are used to tell the liker which libraries it has to use, but not to tell anything about header paths to the compiler.

To tell the compiler to search header in non-standard location, you have to use the -I flags (upper case i).

gcc -I/path/to/my/header/ -I/other/path/to/custom/headers -c myfile.c

I therefore put in a direct reference to the header files. This results in a
different error of : -

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

I also tried adding the -static flag to the g++ call and get the following error
that cant be removed even by adding the -dynamic flag as requested

        /var/folders/VP/VPvhBRGPHTmiDcjDfUtnTk+++TI/-Tmp-//cczY3qou.s:64:
FATAL:incompatible feature used: section type non_lazy_symbol_pointers
        (must specify "-dynamic" to be used)

Does anyone have any ideas what i am / have done wrong?

Many Thanks

Russell Edwards


-- Jean-Daniel




_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to