Compiling for WinCE : 'swprintf' was not declared in this sc

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.
junkie_crew
Blank Cone
Blank Cone
Posts: 35
Joined: 31 Jul 2007 15:28

Compiling for WinCE : 'swprintf' was not declared in this sc

Postby junkie_crew » 08 Oct 2007 11:05

Hi,

I am trying to compile vlc-0.8.6c for WinCE using the cegcc compiler. I am facing this error in file open.cpp :
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -D_OFF_T_ -D_off_t=long -DSYS_MINGWCE -I../../../include `top_builddir="../../.." ../../../vlc-config --cxxflags builtin pic wince` -Wsign-compare -Wall -D__stdcall= -D_OFF_T_ -D__USE_W32_SOCKETS -D__CEGCC__ -D_WIN32_WCE -DUNDER_CE -I/opt/cegcc/arm-wince-cegcc/include -pipe -c -o libwince_a-open.o `test -f 'open.cpp' || echo './'`open.cpp
<command line>:1:1: warning: "__stdcall" redefined
<built-in>: warning: this is the location of the previous definition
open.cpp: In member function 'void OpenDialog::NetPanel(HWND__*)':
open.cpp:356: error: 'swprintf' was not declared in this scope
open.cpp: In member function 'void OpenDialog::OnNetPanelChange(int)':
open.cpp:717: error: 'swscanf' was not declared in this scope
I have seached on the web, and it is told that some functions from UNICODE standard are not implemented in cegcc headers file. Indeed, I did not find any definition of functions swprintf and swscanf.
There could be, I think, two solutions for such a problem :

First, to replace the cegcc wchar.h header with another one that defines this functions.
Or, to replace these functions with supported WinCE functions, that are defined under cegcc.

If anyone has a better idea, I am interested in it :)

junkie_crew
Blank Cone
Blank Cone
Posts: 35
Joined: 31 Jul 2007 15:28

Re: Compiling for WinCE : 'swprintf' was not declared in this sc

Postby junkie_crew » 08 Oct 2007 16:22

There is something I do not understand. The function swprintf is used in the misc/modules.c file. There is a compiler switch UNDER_CE, which is defined in my compiling command.

I cannot tell why this function does not cause any error in this case, whereas it does in /modules/gui/wince/open.cpp

Does anyone know where swprintf is declared in modules.c ?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Compiling for WinCE : 'swprintf' was not declared in this sc

Postby Jean-Baptiste Kempf » 08 Oct 2007 18:40

You can change the open.cpp files without problems, using cegcc supported functions.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 29 guests