[Libav-user] Beginner c++ compiling error
jan hölscher
jan.hoelscher at codergrid.de
Thu Sep 29 10:39:52 CEST 2011
before we can discuss further, please provide the complete command line to
the linker and error from it.
2011/9/29 mounir younes <mounir.younes at gmail.com>
> Yes I did that ! But still having the problem after building.
>
>
> On Wed, Sep 28, 2011 at 7:53 PM, jan hölscher <jan.hoelscher at codergrid.de>wrote:
>
>> did you surround your libav header includes with :
>>
>> #ifdef __cplusplus
>> extern "C" {
>> #endif
>> #include <libavformat/avformat.h>
>> #include <libavcodec/avcodec.h>
>> #include <libavcodec/opt.h>
>> #include <libavutil/avutil.h>
>> #include <libswscale/swscale.h>
>> #include <libavutil/fifo.h>
>> #include <libavutil/rational.h>
>> #ifdef __cplusplus
>> }
>> #endif
>>
>>
>> 2011/9/28 mounir younes <mounir.younes at gmail.com>
>>
>>> I gave the names without the linker prefix. I keep getting the "undefined
>>> reference to" error and cannot solve it.
>>>
>>> On Sat, Sep 24, 2011 at 10:43 PM, Alex Cohn <alexcohn at netvision.net.il>wrote:
>>>
>>>> In your list of libs, "-l" is obviously doubled. Try to give the names
>>>> to the linker without the prefix.
>>>> On Sep 24, 2011 7:58 AM, "mounir younes" <mounir.younes at gmail.com>
>>>> wrote:
>>>> > Hello, I am new to ffmpeg and I am getting compiling errors while
>>>> compiling
>>>> > c++ code with ffmpeg libraries. It seems that a lot of people are
>>>> getting
>>>> > this with the new ffmpeg but I couldn't find a solution that I could
>>>> > understand.
>>>> >
>>>> > I found a link that says that this
>>>> >
>>>> > CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure
>>>> > (http://code.google.com/p/ffmpegsource/issues/detail?id=11)
>>>> >
>>>> >
>>>> > solves it but unfortunately I tried it but nothing happened and I
>>>> don't know
>>>> > what to do ! I am adding the file headers which are being
>>>> automatically
>>>> > detected by netbeans so the libraries are already found. I tried
>>>> adding
>>>> > these -lavdevice -lavformat -lavcodec -lavutil -lswscale -lbz2 to the
>>>> > linker as well
>>>> >
>>>> > (
>>>> >
>>>> http://libav-users.943685.n4.nabble.com/QT-and-FFmpeg-undefined-reference-to-av-free-and-more-td946811.html
>>>> > )
>>>> >
>>>> > when adding them netbeans knew them and gave them proper library icons
>>>> (thus
>>>> > it recognized that these libraries are present otherwise it would've
>>>> > replaced them with a white icon with question mark). But, when
>>>> compiling I
>>>> > get this
>>>> >
>>>> > /usr/bin/ld: cannot find -l-lavdevice
>>>> > /usr/bin/ld: cannot find -l-lavformat
>>>> > /usr/bin/ld: cannot find -l-lavcodec
>>>> > /usr/bin/ld: cannot find -l-lavutil
>>>> > /usr/bin/ld: cannot find -l-lswscale
>>>> > /usr/bin/ld: cannot find -l-lbz2
>>>> >
>>>> > And this is really killing me. I have been trying to solve this for
>>>> days.
>>>> >
>>>> > Thank you in advance.
>>>>
>>>> _______________________________________________
>>>> Libav-user mailing list
>>>> Libav-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>
>>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110929/8c06bfee/attachment.html>
More information about the Libav-user
mailing list