Need a compiled wxSkin Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Need a compiled wxSkin

Post 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
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post 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.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post 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;
}
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post 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|
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post 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
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post 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!
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post 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.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post 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.
Attachments
影像 000.png
影像 000.png (23.4 KiB) Viewed 17705 times
影像 001.png
影像 001.png (30.7 KiB) Viewed 17705 times
Last edited by honeymagico on Fri Oct 08, 2010 9:34 am, edited 2 times in total.
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
In your OnInit() call wxInitAllImageHandlers();.
That should do the trick.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post by honeymagico »

there is wxInitAllImageHandlers() in oninit()
i use your example from wxSkin package.

this is really weird...
liubl
Experienced Solver
Experienced Solver
Posts: 63
Joined: Sun Apr 11, 2010 11:25 am

Re: Need a compiled wxSkin

Post 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.
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Re: Need a compiled wxSkin

Post 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.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Need a compiled wxSkin

Post 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
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
honeymagico
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jul 27, 2010 7:33 am
Location: The Republic of China (ROC)

Post 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...
Attachments
影像 002.png
影像 002.png (37.33 KiB) Viewed 17630 times
win7,ubuntu 10.04
code::blocks 10.05
mingw,gcc
wx 2.9.1 unicode
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post 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!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Post Reply