Bug Report: wxVLC playlist.cpp does not compile with STL

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Tinyn

Bug Report: wxVLC playlist.cpp does not compile with STL

Postby Tinyn » 10 Jan 2006 05:04

I'm sorry I don't have the error message any more, but I can tell you how to recreate it. (I'm using gentoo, but this problem has to do with wx calls so its probably crossplatform. This applies to VLC 0.8.2 and up.)


In wxWidgets setup.h there is an option for USE_STL. This defaults to 0, but if you set it to 1, the wxList, wxArray, wxString, etc classes become wrappers around the STL.

In playlist.cpp there (line 1200ish, or 1600ish) there is a line to declare an instance of wxMenuItemList::Node. With STL enabled the wxList class (and thus wxMenuItemList) no longer has a Node member. This causes a compiler error.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 Jan 2006 23:50

Would you be able to come up with a patch to fix that ? (this would make it easier for us to fix it ...)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

_wedge_
New Cone
New Cone
Posts: 5
Joined: 28 May 2007 18:34
Location: Austria

Postby _wedge_ » 02 Jun 2007 21:05

hi

i know this thread is old..., but today i got the same error, not only in playlist.cpp also in menus.cpp [static void RecursiveDestroy( wxMenu *menu )].
I rewrote the function in the menus.cpp, also the playlist.cpp function wxMenu * Playlist::ViewMenu(). I hope this is useful...

menus.cpp:

Code: Select all

static void RecursiveDestroy( wxMenu *menu ) { for(signed short i = (signed short) menu->GetMenuItemCount(); i >= 0; i--) { wxMenuItem *item = menu->FindItemByPosition(i); if(item != NULL) { wxMenu *submenu = item->GetSubMenu(); if(submenu) RecursiveDestroy(submenu); menu->Delete(item); } } }
playlist.cpp

Code: Select all

wxMenu * Playlist::ViewMenu() { if( !p_view_menu ) { p_view_menu = new wxMenu; } else /*rewritten part*/ { for(signed short i = (signed short) p_view_menu->GetMenuItemCount(); i >= 0; i--) { wxMenuItem *item = p_view_menu->FindItemByPosition(i); if(item != NULL) p_view_menu->Delete(item); } } /*end of rewritten part*/ /* FIXME : have a list of "should have" views */ p_view_menu->Append( FirstView_Event + VIEW_CATEGORY, wxU(_("Normal") ) ); p_view_menu->Append( FirstView_Event + VIEW_S_AUTHOR, wxU(_("Sorted by Artist") ) ); p_view_menu->Append( FirstView_Event + VIEW_S_ALBUM, wxU(_("Sorted by Album") ) ); return p_view_menu; }
It worked fine for me.

david


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 10 guests