[FFmpeg-user] Video does not see when compiling ffplay using mingw

Ignacio Gonzalez mylaneza at gmail.com
Tue Aug 28 00:56:56 CEST 2012


Sorry, i don't explain myself very well, I want to use ffplay in java, so i
am going to change the name of main function to "play", then i will use
java native interface to create a dll so i can call this play function, but
i need to create a .lib and .dll files for such a purpose.

I am reading http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs to create this
static library, but it does not working, this is what I am doing:

1. I made a copy of ffplay.c and put it into J:\Nacho\Proyectos\Ffplay\.
2. I create ffplay.h with the declaration of

int play(int argc , char **argl );

3. I modify ffplay.c main line
...
int main( int argc, char **argv ) -> int play( int argc, char **argv )
...


4. I copy cmdutil.c to J:\Nacho\Proyectos\Ffplay\

5. I use this command line to create the .def file

gcc -shared -o ffplaydll.dll ffplay.c cmdutils.c
-Wl,--output-def,ffplaydll.def,--out-implib,libffplaydll.a
-IJ:/ffmpeg/ffmpeg-0.10.4 -IJ:/SDL/SDL-1.2.15/include

but this responds with a lot of errors of this kind:

C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccvex5FS.o:cmdutils.c:(.text+0x3323):
undefined reference to `av_mallocz'

and this is where i'm stuck.


i tried to add -LJ:/ffmpeg/ffmpeg-0.10.4/libavdevice/avdevice.lib and
others paths but this doesn't work.





2012/8/27 Roger Pack <rogerdpack2 at gmail.com>

> > Ok, i use "export CFLAGS=" and then configure, make and make install for
> > SDL and then configure, make and make install for ffmpeg and the video
> > displays fine. Thanks for your help, now i will like to modify ffplay
> > source code and the make file so instead of an .exe file i create a .lib
> > file, i don't know if you could help me with the makefile modification or
> > where can i read documentation about creating .lib files with mingw.
>
> The zeranoe builds contain a "-dev" download that I believe has .lib
> files that can be used in association with the .dll's...
> -r
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list