Yes I fixed in thanks guys,

first of all, I did forget about the extern C stuff,
although in Linux I had no problems including the avcodec.h file the normal way,
the proper way is:

extern "C" {
   #include "libavcodec/avcodec.h"
 }

This got rid of almost all errors except undefined reference to av_free(),
I fixed this by including -lavutil.

why my code compiles on linux without -lavutil still remains a mistery (version 
related?).

----------------------------------------
> Date: Mon, 14 Apr 2008 13:15:02 +0200
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: [libav-user] -lavcodec on os X
> 
> Jasper Leemans wrote:
>> Sorry, the linking command that errors is this one:
>> 
>> c++ -headerpad_max_install_names -o 
>> debug/open1394.app/Contents/MacOS/open1394 open1394.o mainwindow.o monitor.o 
>> select.o myconv.o mytrans.o captureset.o featureset.o multigrab.o reticles.o 
>> reticlesdialog.o options.o recordmovie.o moc_mainwindow.o moc_monitor.o 
>> moc_select.o moc_captureset.o moc_featureset.o moc_multigrab.o 
>> moc_reticlesdialog.o moc_options.o moc_recordmovie.o qrc_open1394.o   
>> -F/usr/local/Trolltech/Qt-4.3.2/lib -L/usr/local/Trolltech/Qt-4.3.2/lib 
>> -ldc1394 -lavcodec -framework QtOpenGL -L/usr/local/Trolltech/Qt-4.3.2/lib 
>> -F/usr/local/Trolltech/Qt-4.3.2/lib -framework QtGui -framework Carbon 
>> -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices 
>> -framework OpenGL -framework AGL
> Uhmmm... Since you are compiling a C++ program, did you remember about
> the "extern C" stuff? Missing it can cause linking errors similar to the ones
> you are seeing...
> 
> Also, you are linking libavcodec, but you do not seem to be linking libavutil.
> 
>                               Luca
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user

_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to