[Libav-user] Compile FFmpeg Examples via Eclipse under Windows

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Compile FFmpeg Examples via Eclipse under Windows

Alexander Gribanov
Hello!

I tried to compile FFmpeg Examples under the Windows via Eclipse and MinGW, but I'm not so experienced yet and something doesn't want to work and I can't understand "why?"... Even though, I'm not sure, how should it works actually...

I created a C project in Eclipse 2019.12, copied one of the examples there and connected the "include" folder. It looks like this now:
image.png
I connected it like this:
image.png

After that compilation of the Example was successful, but the Linking failed.
I tried to connect libraries, but it doesn't work...
image.png

I tried also many other ways, also tried to write names of the libraries in the field "Libraries", but it didn't work, all the time the log is following: https://pastebin.com/8zp8MYUf

Could You, please

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Compile FFmpeg Examples via Eclipse under Windows

Strahinja Radman

-------- Original message --------
From: Alexander Gribanov <[hidden email]>
Date: 18/01/2020 09:53 (GMT+01:00)
Subject: [Libav-user] Compile FFmpeg Examples via Eclipse under Windows

Hello!

I tried to compile FFmpeg Examples under the Windows via Eclipse and MinGW, but I'm not so experienced yet and something doesn't want to work and I can't understand "why?"... Even though, I'm not sure, how should it works actually...

I created a C project in Eclipse 2019.12, copied one of the examples there and connected the "include" folder. It looks like this now:
<img src="content://com.samsung.android.email.attachmentprovider/2/1337/RAW" alt="image.png" width="408" height="195" onmouseover="imageMousePointerUpdate(true)" onmouseout="imageMousePointerUpdate(false)" name="com_samsung_android_email_attachmentprovider_2_1337_RAW_1579340967025">
I connected it like this:
<img src="content://com.samsung.android.email.attachmentprovider/2/1338/RAW" alt="image.png" width="542" height="398" onmouseover="imageMousePointerUpdate(true)" onmouseout="imageMousePointerUpdate(false)" name="com_samsung_android_email_attachmentprovider_2_1338_RAW_1579340967027">

After that compilation of the Example was successful, but the Linking failed.
I tried to connect libraries, but it doesn't work...
<img src="content://com.samsung.android.email.attachmentprovider/2/1339/RAW" alt="image.png" width="542" height="363" onmouseover="imageMousePointerUpdate(true)" onmouseout="imageMousePointerUpdate(false)" name="com_samsung_android_email_attachmentprovider_2_1339_RAW_1579340967028">

I tried also many other ways, also tried to write names of the libraries in the field "Libraries", but it didn't work, all the time the log is following: https://pastebin.com/8zp8MYUf

Could You, please


Your build line does not include libraries required to link the examples i think. Not sure where you need to put them in Eclipse but there definately should be -lavformat -lavutil -lavcodec -lavfilter in that linking line.

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Compile FFmpeg Examples via Eclipse under Windows

Alexander Gribanov
Thank You very much, but I'm not sure, which command You mean... Compiler or linker command?
I have tried this, but still, it doesn't work... Any ideas about how to compile it or maybe there is documentation on how to build the Examples?

Invoking: Cross GCC Compiler
gcc -I"C:\portable\ffmpeg-4.2.1-win64-dev\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"encode_video.d" -MT"encode_video.o" -o "encode_video.o" "../encode_video.c"
 
Invoking: Cross GCC Linker
gcc -L"C:\portable\ffmpeg-4.2.1-win64-dev\lib" -o "ffmpeg-examples"  ./encode_video.o   -lavformat -lavutil -lavcodec -lavfilter


сб, 18 янв. 2020 г. в 13:00, Strahinja Radman <[hidden email]>:

-------- Original message --------
From: Alexander Gribanov <[hidden email]>
Date: 18/01/2020 09:53 (GMT+01:00)
Subject: [Libav-user] Compile FFmpeg Examples via Eclipse under Windows

Hello!

I tried to compile FFmpeg Examples under the Windows via Eclipse and MinGW, but I'm not so experienced yet and something doesn't want to work and I can't understand "why?"... Even though, I'm not sure, how should it works actually...

I created a C project in Eclipse 2019.12, copied one of the examples there and connected the "include" folder. It looks like this now:
image.png
I connected it like this:
image.png

After that compilation of the Example was successful, but the Linking failed.
I tried to connect libraries, but it doesn't work...
image.png

I tried also many other ways, also tried to write names of the libraries in the field "Libraries", but it didn't work, all the time the log is following: https://pastebin.com/8zp8MYUf

Could You, please


Your build line does not include libraries required to link the examples i think. Not sure where you need to put them in Eclipse but there definately should be -lavformat -lavutil -lavcodec -lavfilter in that linking line.
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Compile FFmpeg Examples via Eclipse under Windows

Strahinja Radman


On Sat, Jan 18, 2020 at 11:48 AM Alexander Gribanov <[hidden email]> wrote:
Thank You very much, but I'm not sure, which command You mean... Compiler or linker command?
I have tried this, but still, it doesn't work... Any ideas about how to compile it or maybe there is documentation on how to build the Examples?


Found this info on the net:

Here are steps to add an external library
http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_external_library_to_my_C.2B.2B_project.3F

1) in Properties>>C/C++ Build>>Settings>>GCC C++ Compiler >> Includes you must add the include path for the external library (where the header reside). This information is needed by the Eclipse indexer (code completion etc.) and the compiler

2) Properties>>C/C++ Build>>Settings>>GCC C++ Linker >> Libraries you must add the library search path (option -L) and the library you want to link against (option -l). This info is needed for the linker.  --

Not sure I can be of further help, sorry

Regards
Strahinja Radman

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Compile FFmpeg Examples via Eclipse under Windows

Alexander Gribanov
Thank You, but it seems, this link is a bit outdated (2007)...

Well, I think, now the most problem is that I don't know "WHAT" should I do rather than "HOW" to do it...
I mean, the problem is NOT to find in the Eclipse, where is it in the Menu, but what kind of Command do I need as the Result to Compile and Link the project...

Could anyone tell me, please, how could I Compile these Examples under the Windows just with Console and MinGW (without Eclipse first)?
Then maybe I'll be able to understand, what do I need and then what should I pass to Eclipse...

Regards

сб, 18 янв. 2020 г. в 14:35, Strahinja Radman <[hidden email]>:


On Sat, Jan 18, 2020 at 11:48 AM Alexander Gribanov <[hidden email]> wrote:
Thank You very much, but I'm not sure, which command You mean... Compiler or linker command?
I have tried this, but still, it doesn't work... Any ideas about how to compile it or maybe there is documentation on how to build the Examples?


Found this info on the net:

Here are steps to add an external library
http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_external_library_to_my_C.2B.2B_project.3F

1) in Properties>>C/C++ Build>>Settings>>GCC C++ Compiler >> Includes you must add the include path for the external library (where the header reside). This information is needed by the Eclipse indexer (code completion etc.) and the compiler

2) Properties>>C/C++ Build>>Settings>>GCC C++ Linker >> Libraries you must add the library search path (option -L) and the library you want to link against (option -l). This info is needed for the linker.  --

Not sure I can be of further help, sorry

Regards
Strahinja Radman
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Compile FFmpeg Examples via Eclipse under Windows

Carl Eugen Hoyos-2
Am Sa., 18. Jan. 2020 um 12:55 Uhr schrieb Alexander Gribanov
<[hidden email]>:

> Could anyone tell me, please, how could I Compile these Examples under the
> Windows just with Console and MinGW (without Eclipse first)?

$ make examples

Imo, building with WSL is much easier (and faster) than with MinGW.

Please find out what top-posting means and avoid it here,

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".