Ahoj psal jsem program pod Win Vista, a prubezne ho zkousel prekladat na virtualnim stroji s Ubuntu. Kdyz jsem si vsak nainstaloval cistou instalaci Ubuntu a pokusil se program prelozit dostavam hlasky vypsane nize se kterymi se nevim rady a to ani po prohledani diskuznich for.
Poprosil bych nekoho zkusenejsiho zda by mi nemohl rici pricinu problemu. Predem dekuji.
#ifndef JUK_H_INCLUDED
#define JUK_H_INCLUDED
class JukeboxApp : public wxApp
{
public:
virtual bool OnInit();
};
///
class SDL_Frame : public wxFrame
{
public :
SDL_Frame (wxWindow* parent, wxWindowID id,const wxString& label) : wxFrame(parent, id, label, wxDefaultPosition,wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
wxButton* btn = new wxButton(this,wxID_ANY,_("Click me!")) ;
btn->Show () ;
}
void OnClicked (wxCommandEvent& evt)
{
WX_SendData((::Uint8)SDL_USEREVENT,0,NULL) ;
}
private :
DECLARE_EVENT_TABLE()
} ;
BEGIN_EVENT_TABLE(SDL_Frame, wxFrame)
EVT_BUTTON(wxID_ANY, SDL_Frame::OnClicked)
END_EVENT_TABLE()
class WXFrame_DebugAlgoritmu : public WX_Object
{
public :
bool OnInit ()
{
DebugAlgoritmu::DebugAlgoritmu* frame = new DebugAlgoritmu::DebugAlgoritmu(NULL) ;
frame->Show() ;
return true ;
}
int OnExit ()
{
return 0 ;
}
void OnData (WX_Data* data)
{
fprintf(stderr, "Get SDL event.%s\n", "DebugAlgoritmu");
}
private :
} ;
class WXFrame_Password : public WX_Object
{
public :
bool OnInit ()
{
Password::Password* frame = new Password::Password(NULL) ;
frame->Show() ;
return true ;
}
int OnExit ()
{
return 0 ;
}
void OnData (WX_Data* data)
{
fprintf(stderr, "Get SDL event.%s\n", "Password");
}
private :
} ;
class WXFrame_ServisniMenu: public WX_Object
{
public :
bool OnInit ()
{
ServisniMenu::ServisniMenu* frame = new ServisniMenu::ServisniMenu(NULL) ;
///SDL_Frame* frame = new SDL_Frame(NULL, wxID_ANY, _T("Test")) ;
frame->Show() ;
return true ;
}
int OnExit ()
{
return 0 ;
}
void OnData (WX_Data* data)
{
fprintf(stderr, "Get SDL event.%s\n", "ServisniMenu");
}
private :
} ;
class WXFrame_OknoVidea: public WX_Object
{
public :
bool OnInit ()
{
OknoVidea::OknoVidea* frame = new OknoVidea::OknoVidea(NULL) ;
frame->Show() ;
return true ;
}
int OnExit ()
{
return 0 ;
}
void OnData (WX_Data* data)
{
fprintf(stderr, "Get SDL event.%s\n", "OknoVidea");
}
private :
} ;
class SDL_Data : public WX_Data
{
public :
SDL_Data () : WX_Data ()
{
m_pStrBuf = NULL ;
}
void SetData ( const char* data )
{
if ( Lock () ) {
if ( data == NULL ) return ;
if ( m_pStrBuf != NULL ) {
delete[] m_pStrBuf ;
}
m_pStrBuf = new char [strlen(data)+1] ;
strcpy ( m_pStrBuf, data ) ;
Unlock () ;
}
}
void OnRelease ()
{
delete[] m_pStrBuf ;
}
private :
char* m_pStrBuf ;
} ;
#endif // JUK_H_INCLUDED
In member function ‘virtual bool WXFrame_DebugAlgoritmu::OnInit()’:|
error: ‘frame’ was not declared in this scope|
error: expected type-specifier|
error: expected ‘;’|
In member function ‘virtual bool WXFrame_Password::OnInit()’:|
error: ‘frame’ was not declared in this scope|
error: expected type-specifier|
error: expected ‘;’|
In member function ‘virtual bool WXFrame_ServisniMenu::OnInit()’:|
error: ‘frame’ was not declared in this scope|
error: expected type-specifier|
error: expected ‘;’|
In member function ‘virtual bool WXFrame_OknoVidea::OnInit()’:|
error: ‘frame’ was not declared in this scope|
error: expected type-specifier|
error: expected ‘;’|
In function ‘int main(int, char**)’:|
warning: passing NULL to non-pointer argument 1 of ‘int WX_Init(int, char**)’|
||=== Build finished: 12 errors, 1 warnings ===|