Page 1 of 2

Need a compiled wxSkin

Posted: Fri Oct 08, 2010 5:45 am
by honeymagico
I try to compile wxSkin with CMake follow README file but have some error.

Then I try to just include sources file, still not work.
there are many error appear at each "::wxLogError" line and others.

Serch this Forum by keyword wxSkin,I have read every post but cant solve it.

so I think if Somebody can do me a favor.Send a Compiled wxSkin will solve my problem.

this may help some people who cant compile wxSkin successful.

sorry for my presumptuous request,I'm pressed for time.

-------
wxWidgets 2.9.1
MinGW 4.4.1
Code::Blocks 10.05
CMake 2.8.2
wxSkin 0.9 alpha
OS:windows 7 , Ubuntu 10.04

Posted: Fri Oct 08, 2010 6:06 am
by upCASE
Hi!
Actually if cmake fails, simply create a simple wxWidgets application, try that this compiles and then add all wxSkin sourcefiles to it (adding the include path of course). You don't really need to compile it as a library.

Posted: Fri Oct 08, 2010 6:53 am
by honeymagico
Sorry for my poor english...

I try this method but not work.

I add all wxskin source and add path to include
and get some errors

C:\CPP_WORK\wxSkinTest\wxSkinEngine.cpp|88|error: no 'bool wxSkinEngine::ReassignControlSkin(const wxWindow*, const wxString&)' member function declared in class 'wxSkinEngine'|
C:\CPP_WORK\wxSkinTest\wxSkinEngine.cpp||In member function 'bool wxSkinEngine::LoadInfo(const wxString&, wxString&, wxString&, wxString&, wxString&, wxString&, wxImage&)':|


Code: Select all




#include "main.h"
#include <wxskinsimpleframe.h>

IMPLEMENT_APP(MyApp)

bool MyApp::OnInit()
{
    wxSkinSimpleFrame* frame = new    wxSkinSimpleFrame(NULL,wxID_ANY,"Title goes here");
    return true;
}

Posted: Fri Oct 08, 2010 7:03 am
by honeymagico
I try do add declare in wxSkinEngine.h , but still get errors

C:\CPP_WORK\wxSkinTest\wxSkinWindow.cpp||In member function 'bool wxSkinWindow::SetShape(const wxRegion&)':|

C:\CPP_WORK\wxSkinTest\wxSkinWindow.cpp|81|error: 'GetHwnd' was not declared in this scope|

C:\CPP_WORK\wxSkinTest\wxSkinWindow.cpp|89|error: 'GetHrgnOf' was not declared in this scope|

C:\CPP_WORK\wxSkinTest\wxSkinWindow.cpp|96|error: 'GetHwnd' was not declared in this scope|

Posted: Fri Oct 08, 2010 7:16 am
by upCASE
Hi!
honeymagico wrote:I try do add declare in wxSkinEngine.h , but still get errors
That's odd...
Try opening wxSkinWindow.cpp and alter the top #ifdef block to

#ifdef __WXGTK__
#include "wx/gtk/win_gtk.h"
#elif defined(__WXMAC__)
#include "wx/mac/private.h"
#elif defined(__WXMSW__)
#include <Windows.h>
#endif

Posted: Fri Oct 08, 2010 7:39 am
by honeymagico
i add windows.h into #ifdef and get the same error
then i search there is a gethwnd declation in wx/msw/private.h

i change windows.h to wx/msw/private.h
is this correct?

now i compile my app without error
and i will try to follow your tutorial
hope wxSkin can work correctly

thanks your help.
wxSkin is good!

Posted: Fri Oct 08, 2010 8:33 am
by upCASE
Hi!
honeymagico wrote:i change windows.h to wx/msw/private.h
is this correct?
Yes, perfectly ok.
I wonder why it worked for me. Nobody else ever reported this...
Anyway, I'll close this question.

Posted: Fri Oct 08, 2010 8:47 am
by honeymagico
1:
I compiled example/main.cpp and make a executable.
Run it but get error as attachment 000
then i press cancel , get attachment 001
what's wrong?

2:
I forgot a problem...
below errors is happened near each "::wxLogError()" in guibuilder.cpp
i make it become comment by add "//" in front of those line to prevent error

C:\wxSkin\include\guibuilder.h||In constructor 'wxGbWindowStub::wxGbWindowStub(wxString, wxWindow*)':|
C:\wxSkin\include\guibuilder.h|675|warning: comparison between signed and unsigned integer expressions|
C:\CPP_WORK\wxSkinTest2\guibuilder.cpp||In member function 'int wxGbBaseItem::ParseCommonFlags(wxGbParseBuffer&, wxSizerFlags&, wxString&)':|
C:\CPP_WORK\wxSkinTest2\guibuilder.cpp|292|error: expected id-expression before 'if'|
C:\CPP_WORK\wxSkinTest2\guibuilder.cpp|292|error: expected ';' before 'if'|
C:\CPP_WORK\wxSkinTest2\guibuilder.cpp|292|error: expected '}' before 'else'|
C:\CPP_WORK\wxSkinTest2\guibuilder.cpp|310|error: expected unqualified-id before 'while'|
||=== Build finished: 4 errors, 1 warnings ===|

do you have any idea for this?


Sorry for poor English and such miscellaneous questions.

Posted: Fri Oct 08, 2010 9:14 am
by upCASE
Hi!
In your OnInit() call wxInitAllImageHandlers();.
That should do the trick.

Posted: Fri Oct 08, 2010 9:20 am
by honeymagico
there is wxInitAllImageHandlers() in oninit()
i use your example from wxSkin package.

this is really weird...

Re: Need a compiled wxSkin

Posted: Fri Oct 08, 2010 12:35 pm
by liubl
::wxLogError error maybe caused by you didn't set wxUSE_STD_IOSTREAM when building wxWidgets. Some package like wxSkin needs wxLog to do the logging thinks maybe require this marco.

wxUSE_STD_IOSTREAM locates at PathToWx/include/wx/msw/setup0.h&setup.h.

You can take a try.

Re: Need a compiled wxSkin

Posted: Fri Oct 08, 2010 2:04 pm
by honeymagico
liubl wrote:::wxLogError error maybe caused by you didn't set wxUSE_STD_IOSTREAM when building wxWidgets. Some package like wxSkin needs wxLog to do the logging thinks maybe require this marco.

wxUSE_STD_IOSTREAM locates at PathToWx/include/wx/msw/setup0.h&setup.h.

You can take a try.
so i need to recompile wxWidgets?
or just edit setup.h?

thanks your help.

Re: Need a compiled wxSkin

Posted: Fri Oct 08, 2010 2:33 pm
by evstevemd
honeymagico wrote:
liubl wrote:::wxLogError error maybe caused by you didn't set wxUSE_STD_IOSTREAM when building wxWidgets. Some package like wxSkin needs wxLog to do the logging thinks maybe require this marco.

wxUSE_STD_IOSTREAM locates at PathToWx/include/wx/msw/setup0.h&setup.h.

You can take a try.
so i need to recompile wxWidgets?
or just edit setup.h?

thanks your help.
Recompile

Posted: Fri Oct 08, 2010 7:41 pm
by honeymagico
I recompiled wxWidgets with wxUSE_STD_IOSTREAM 1 in setup.h
and recompiled guibuilder.cpp
but still get the same errors

:cry: :cry:

I write a simple wxLogError test app,it work fine.

wxSkin is exactly what I need,but it seems so hard for me...

Posted: Fri Oct 08, 2010 7:49 pm
by evstevemd
try with 2.8.xx?
Your sig shows that you use 2.9.1 and I'm not sure if it works with the version. UpCase is in position to pronounce that!