Author Topic: wxSmith build  (Read 5443 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
wxSmith build
« on: December 30, 2005, 09:41:30 am »
what is the proposed (best) way to build wxsmith under linux ?

i couldn't find a linux CB-projectfile for the actual SVN version

[edit]
 it seems as answers this
Well, I 've added it in the build. wxSmith builds when configure runs with --enable-contrib.
I got to tell you: it works SWEET :D
my primary question how to build  :D
« Last Edit: December 30, 2005, 10:01:40 am by tiwag »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith build
« Reply #1 on: December 31, 2005, 12:38:58 am »
I've removed cbp for unix - it compiles with automake, compiling using .cbp file caused many problems (f.ex. what's deestination path)

Simply run: ./configure --enable-contrib instead of ./configure and it compiles :D

But I must warn - I haven't work with wxSmith on Linux for some time and I don't know how stable it's on this platform

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxSmith build
« Reply #2 on: December 31, 2005, 06:33:45 am »
... I haven't work with wxSmith on Linux for some time and I don't know how stable it's on this platform

we'll see  - then you get reports  :D

Offline rudin

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: wxSmith build
« Reply #3 on: December 31, 2005, 09:05:38 am »
I got the following error on SVN rev 1627, wxGTK 2.6.2, Slackware 10.2, and it seems related to wxSmith:

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -I../../../../../src/sdk -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/sdk/propgrid/include -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -g -O2 -O2 -ffast-math -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -MT wxsstdmanager.lo -MD -MP -MF .deps/wxsstdmanager.Tpo -c wxsstdmanager.cpp  -fPIC -DPIC -o .libs/wxsstdmanager.o
In file included from ../properties/wxsstringlistcheckproperty.h:4,
                 from wxschecklistbox.h:5,
                 from wxsstdmanager.cpp:40:
../../../../../src/sdk/propgrid/include/wx/propgrid/propdev.h:18:3: #error "propdev.h must be included *before* advprops.h"
make[6]: *** [wxsstdmanager.lo] Error 1
make[6]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src/plugins/contrib/wxSmith/defwidgets'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src/plugins/contrib/wxSmith'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src/plugins/contrib/wxSmith'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ruslan/codeblocks-build/trunk/src'
make: *** [all-recursive] Error 1

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxSmith build
« Reply #4 on: December 31, 2005, 09:27:08 am »
I got the following error on SVN rev 1627, wxGTK 2.6.2, Slackware 10.2, and it seems related to wxSmith:
...
i've just built SVN rev 1628 on Ubuntu 5.10 wxGTK 2.6.1-unicode-shared
using G++ 4.0.2 and didn't get any errors

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxSmith build
« Reply #5 on: December 31, 2005, 09:35:22 am »
You 're not mentioning your gcc version, but if it is greater then 3.4 the this might be an issue with precompiled headers.
When you 're getting build errors that noone else seems to be getting, delete src/sdk/sdk.h.gch and src/plugins/contrib/wxSmith/wxsheaders.h.gch and re-run "make".

These are the precompiled headers which some times might not be rebuilt even if needed. This might be the source of your problem...
Be patient!
This bug will be fixed soon...

Offline rudin

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: wxSmith build
« Reply #6 on: December 31, 2005, 12:07:40 pm »
GCC version is 3.3.6. I tried SVN rev 1629 and gain exactly the same error result.

I couldn't find file src/sdk/sdk.h.gch nor src/plugins/contrib/wxSmith/wxsheaders.h.gch.

I configure using enable-contrib option (configure --enable-contrib).

Is there anything wrong with my wxWidgets build? Some result of wx-config:

wx-config --cxxflags:
-I/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 

wx-config --libs:
-L/opt/wx/2.6/lib -pthread   -L/usr/X11R6/lib  -lwx_gtk2u-2.6

Thanks in advance for any help.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: wxSmith build
« Reply #7 on: December 31, 2005, 12:14:10 pm »
The problem with gcc 3.3 is: it doesn't support precompiled headers. So it's pretty clear that you don't have src/sdk/sdk.h.gch and src/plugins/contrib/wxSmith/wxsheaders.h.gch because your compiler can't create them.
As far as I know it should be possible to compile Code::Blocks without using precompiled headers but I had major problems while trying this, too.
I don't know if any of the developers still uses gcc 3.3 so there might really be a problem with the source that just doesn't appear while precompiled headers are used.

Maybe I'll try to compile Code::Blocks with gcc 3.3.6 again to find a solution for this but for now I can obly say that gcc 3.4.4 builds revision 1629 without problems.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline rudin

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: wxSmith build
« Reply #8 on: December 31, 2005, 12:41:21 pm »
Der Meister,

Thanks for your info. I'll upgrade my compiler soon.

I wish you all a happy new year!

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: wxSmith build
« Reply #9 on: December 31, 2005, 01:48:44 pm »
OK, I tried it. Code::Blocks compiles well without precompiled headers (that surprised me), only the wxSmith plugin needs "some" patches.
Here we go:
Code: [Select]
$ svn diff src/plugins/contrib/wxSmith/
Index: src/plugins/contrib/wxSmith/wxsmithwizard.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithwizard.cpp       (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithwizard.cpp       (working copy)
@@ -1,6 +1,8 @@
 #include "wxsheaders.h"
 #include "wxsmithwizard.h"
 #include "wxswizard.h"
+#include <configmanager.h>
+#include <licenses.h>
 
 wxSmithWizard::wxSmithWizard()
 {

Index: src/plugins/contrib/wxSmith/wxscoder.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxscoder.cpp    (revision 1629)
+++ src/plugins/contrib/wxSmith/wxscoder.cpp    (working copy)
@@ -3,6 +3,7 @@
 
 #include <manager.h>
 #include <editormanager.h>
+#include <configmanager.h>
 #include <messagemanager.h>
 #include <wx/ffile.h>

Index: src/plugins/contrib/wxSmith/wxsmithmime.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithmime.h   (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithmime.h   (working copy)
@@ -1,13 +1,15 @@
 #ifndef WXSMITHMIME_H
 #define WXSMITHMIME_H
 
+#include <cbplugin.h>
+
 /** Helper plugin dealing with mime types */
 class wxSmithMime : public cbMimePlugin

Index: src/plugins/contrib/wxSmith/wxswizard.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxswizard.cpp   (revision 1629)
+++ src/plugins/contrib/wxSmith/wxswizard.cpp   (working copy)
@@ -4,6 +4,7 @@
 #include <wx/filename.h>
 #include <cbproject.h>
 #include <projectmanager.h>
+#include <configmanager.h>
 #include <manager.h>
 #include <messagemanager.h>
 #include <customvars.h>

Index: src/plugins/contrib/wxSmith/wxsmithmime.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithmime.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithmime.cpp (working copy)
@@ -5,6 +5,8 @@
 #include "resources/wxswindowres.h"
 #include "wxsextresmanager.h"
 
+#include <licenses.h>
+
 wxSmithMime::wxSmithMime()
 {
        m_PluginInfo.name = _("wxSmithMime");

Index: src/plugins/contrib/wxSmith/wxsglobals.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsglobals.h    (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsglobals.h    (working copy)
@@ -5,6 +5,7 @@
 #include <wx/settings.h>
 #include <wx/scrolwin.h>
 #include <wx/propgrid/propgrid.h>
+#include <wx/propgrid/propdev.h>
 #include <wx/propgrid/advprops.h>
 #include <cbplugin.h>
 
Index: src/plugins/contrib/wxSmith/wxsmith.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmith.cpp     (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmith.cpp     (working copy)
@@ -17,6 +17,7 @@
 #include <wx/notebook.h>
 #include <wx/sashwin.h>
 #include <configmanager.h>
+#include <cbexception.h>
 
 #include "wxsmith.h"
 #include "wxswindoweditor.h"

Index: src/plugins/contrib/wxSmith/wxsdragwindow.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsdragwindow.cpp       (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsdragwindow.cpp       (working copy)
@@ -4,6 +4,8 @@
 #include <wx/dcclient.h>
 #include <wx/dcbuffer.h>
 
+#include <configmanager.h>
+
 #include "widget.h"
 #include "wxsevent.h"
 #include "wxsmith.h"

And please - remove the macros from wxsglobals.h. It's really disturbing when the compiler tells you errors in code that seems not to exist. For example it couldn't find the declaration for ReadInt in one of the patched files (I think it was wxsdragwindow.cpp) - but ReadInt was never used (directly) in this file. Even more problematic is: The macros for the ConfigManager look like normal variables and not like macros. Without the "Find declaration of... " function it would probably never have found this error.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline rudin

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: wxSmith build
« Reply #10 on: December 31, 2005, 02:20:25 pm »
I was upgraded GCC into version 3.4.5 and everything works like a charm :)

Thanks for everybody's help.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith build
« Reply #11 on: January 02, 2006, 02:56:43 pm »
Sorry for problems :oops: And thx for patch :)

I've updated files and fixed some linux only bugs (I'm working on Win were wxSmith works perfect but and after switch to linux it likes to crash :()

Can anyone check if it works now ? And bug-reports would be appreciated :D