undefined reference to `_WinMain@16' error compiling VLC

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
kurt
New Cone
New Cone
Posts: 3
Joined: 03 Jan 2009 13:42

undefined reference to `_WinMain@16' error compiling VLC

Postby kurt » 03 Jan 2009 13:53

Hi all,
I am trying to modify VLC source code in order to include some extra funcionalities in it. I am working on Cygwin platform and since a few weeks, I am not able to compile it. I updated some libraries of Cygwin which may have caused the problem but I've downgraded them and the result was the same. This is the output of executing 'make' command:

make[2]: Entering directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules'
Making all in access
make[3]: Entering directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules/access'
make[4]: Entering directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules/access'
if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/win32/include -I/usr/win32/include/ebml -D_OFF_T_
-D_off_t=long -DSYS_MINGW32 -I../../include `top_builddir="../.." ../../vlc-config --cflags plugin access_file
` -Wsign-compare -Wall -mms-bitfields -pipe -MT libaccess_file_plugin_a-file.o -MD -MP -MF ".deps/libaccess_f
ile_plugin_a-file.Tpo" -c -o libaccess_file_plugin_a-file.o `test -f 'file.c' || echo './'`file.c; \
then mv -f ".deps/libaccess_file_plugin_a-file.Tpo" ".deps/libaccess_file_plugin_a-file.Po"; else rm -
f ".deps/libaccess_file_plugin_a-file.Tpo"; exit 1; fi
rm -f libaccess_file_plugin.a
ar cru libaccess_file_plugin.a libaccess_file_plugin_a-file.o
ranlib libaccess_file_plugin.a
/bin/sh ../../libtool --tag=CC --mode=link gcc -mno-cygwin -Wsign-compare -Wall -mms-bitfields -pipe -L/usr/wi
n32/lib -o libaccess_file_plugin.dll libaccess_file_plugin.a -L/usr/local/lib -g -shared -u _vlc_entry__0_8_6
libtool: link: gcc -mno-cygwin -Wsign-compare -Wall -mms-bitfields -pipe -o .libs/libaccess_file_plugin.dll -g
-u _vlc_entry__0_8_6 -L/usr/win32/lib libaccess_file_plugin.a -L/usr/local/lib
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/libmingw32.a(main.o):main.c:(.text+0x104):
undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
make[4]: *** [libaccess_file_plugin.dll] Error 1
make[4]: Leaving directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules/access'
make[3]: *** [all-modules] Error 1
make[3]: Leaving directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules/access'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/mainuser/VLC/vlc-0.8.6e-source/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mainuser/VLC/vlc-0.8.6e-source'
make: *** [all] Error 2

I would highly appreciate any help.
Thank you in advance.

Regards!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: undefined reference to `_WinMain@16' error compiling VLC

Postby VLC_help » 03 Jan 2009 15:26

I suggest that you change to newer build. vlc-0.8.6e isn't supported anymore.

http://cygwin.com/ml/cygwin/1999-05/msg00352.html
might work.

kurt
New Cone
New Cone
Posts: 3
Joined: 03 Jan 2009 13:42

Re: undefined reference to `_WinMain@16' error compiling VLC

Postby kurt » 05 Jan 2009 18:57

Thank you for your reply.
The problem is that all the modifications I've done in the source code are incompatible with the new releases.
I've tried doing what the link suggest but it still fails. The problem must be connected with some cygwin package version as I could compile it before updating them. I've already downgraded mingw-runtime, automake, binutils and libtool packages with no success. Any suggestion??
Thank you again.

kurt
New Cone
New Cone
Posts: 3
Joined: 03 Jan 2009 13:42

Re: undefined reference to `_WinMain@16' error compiling VLC

Postby kurt » 05 Jan 2009 19:12

I've found that if I include an empty main in the file, the error disappears but then it complains about the next file. Should I include it in every file of VLC?? Does this have any consequence?? Can you find an alternative way of solving this??

kj90
Blank Cone
Blank Cone
Posts: 15
Joined: 25 Jun 2010 21:46

Re: undefined reference to `_WinMain@16' error compiling VLC

Postby kj90 » 13 Jul 2010 20:29

I'm having the same problem now. Did you ever find another solution to this?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 36 guests