wxMax compiling issue on linux

BlitzMax Forums/BlitzMax Programming/wxMax compiling issue on linux

UNZ(Posted 2013) [#1]
Hey there,

I had some errors with the ready-to-use version of the wxMax module (I can start most of the examples but they all crash on exiting and none of 'em have a menu bar) so
I checked out the source code.
(btw could someone please change the link from "http://wxmax.googlecode.com/svn/trunk/ wxmax-read-only" to "https://wxmax.googlecode.com/svn/trunk/")

The wx.mod folder is about twice as big now and it looks like there are some more gadgets but the module won't compile :(

I downloaded the static libraries as shown on the installation guide but this did't help.

my output is
In file included from /home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/platform.h:293:0,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/defs.h:21,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/wx.h:15,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.h:26,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp:23:
/home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/chkconf.h:904:9: Fehler: #error "wxUSE_TAB_DIALOG must be defined."
In file included from /home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/wx.h:15:0,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.h:26,
                 from /home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp:23:
/home/aas/Proggen/BlitzMax/mod/wx.mod/include/wx/defs.h:212:26: Fehler: Redeklaration des eingebauten C++-Typs »bool« [-fpermissive]
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp: In Funktion »BBString* bbStringFromWxString(const wxString&)«:
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp:57:64: Fehler: Abfrage des Elementes »data« in »(& s)->wxString::wc_str((*(const wxMBConv*)(&(& wxConvISO8859_1)->wxCSConv::<anonym>)))«, das vom Nicht-Klassentyp »const wxChar* {aka const wchar_t*}« ist
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp: In Elementfunktion »virtual int MaxApp::MainLoop()«:
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp:167:40: Fehler: »class wxAppTraits« hat kein Element namens »CreateEventLoop«
Build Error: failed to compile /home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/wxglue.cpp



Am I missing some libs here, or is there a bug in the code?
wxMax is such an awesome module and I'd really like to use it, so please help! ^^

Last edited 2013


Brucey(Posted 2013) [#2]
I'm working on it… (really!)

Getting everything running against the lastest wxWidgets (2.9.5 SVN)...

OS X version is now using Cocoa instead of Carbon, so the hack/workaround appstub is no longer required.

I may get Win32 built today sometime (with some luck) - well, I'm currently on wx build 5 and the third re-build of the modules. It's a long process getting everything just right :-p

Linux will follow once the rest is up.

Well, OS X is my primary platform, so that's where I work first, and Win32 is the one most people use, so that tends to come next…


UNZ(Posted 2013) [#3]
I'm truly relieved that wxMax isn't dead. ^^
Thanks Brucey


Brucey(Posted 2013) [#4]
I've successfully compiled the latest SVN wxMax against the latest wxWidgets SVN rev 73381.

And I've run some of the samples, which appear to work correctly.


Dabhand(Posted 2013) [#5]

And I've run some of the samples, which appear to work correctly



Tried to build the Scintilla example on OSX (Snow Leopard):-


Building scintilla
Compiling:scintilla.bmx
Linking:scintilla.debug
Undefined symbols:
"WordList::InList(char const*)", referenced from:
ColouriseBlitzMaxDoc(unsigned int, int, int, WordList**, Accessor&)in wxscintilla.debug.macos.x86.a(LexMax.cxx.debug.macos.x86.o)
ColouriseBlitzMaxDoc(unsigned int, int, int, WordList**, Accessor&)in wxscintilla.debug.macos.x86.a(LexMax.cxx.debug.macos.x86.o)
ColouriseBlitzMaxDoc(unsigned int, int, int, WordList**, Accessor&)in wxscintilla.debug.macos.x86.a(LexMax.cxx.debug.macos.x86.o)
ColouriseBlitzMaxDoc(unsigned int, int, int, WordList**, Accessor&)in wxscintilla.debug.macos.x86.a(LexMax.cxx.debug.macos.x86.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build Error: Failed to link /Users/denathorn/BlitzMax/mod/wx.mod/samples/scintilla.debug.app/Contents/MacOS/scintilla.debug
Process complete


Does ne work bonny lad! :)

Dabz


Brucey(Posted 2013) [#6]
I ken that, Dabzie… I hivnae sorted out Scintilla yet :-p

It's a problem with my hand-manked BlitzMax lexxer code. Needs an update for the latest Scintilla APIs.


Dabhand(Posted 2013) [#7]

I ken that, Dabzie… I hivnae sorted out Scintilla yet :-p



Och aye, ah see, weel, that'll be how come then! :D

Can you post when you've fixered it please, thank you nice... I'm using a version from 2008 or something, and it'll be nice to update it just to be sure it's all rosey! :)

Dabz

Last edited 2013


Brucey(Posted 2013) [#8]
Works (at least on OS X) now.

Apparently they rewrote the lexer internals at some point, to be class-based instead of function-based (yay!).
Gave it another bit of a kick and it's built and the sample runs.


Dabhand(Posted 2013) [#9]

Building Modules
Compiling:glue.cpp
Compiling:consts.bmx
In file included from /Users/denathorn/BlitzMax/mod/wx.mod/wxscintilla.mod/glue.cpp:23:
/Users/denathorn/BlitzMax/mod/wx.mod/wxscintilla.mod/glue.h:29:21: error: PropSet.h: No such file or directory
/Users/denathorn/BlitzMax/mod/wx.mod/wxscintilla.mod/glue.h:32:22: error: KeyWords.h: No such file or directory

... Loads of errors ...


The specified files are there mind... Just, well, not grafting!?!

Dabz


Brucey(Posted 2013) [#10]
Ah, yer… well, that's cuz I didn't clean-build it when I tested it, but it was working anyway ;-)

Heh… it's really fixed this time.

Ho hum.


Dabhand(Posted 2013) [#11]

Ah, yer… well, that's cuz I didn't clean-build it when I tested it, but it was working anyway ;-)

Heh… it's really fixed this time.

Ho hum.



lol, no worries, I'll give it another whirl in a bit me auld bean, lol, its a bugger to build... Takes yonks la! :D

Dabz


Brucey(Posted 2013) [#12]
You only need to rebuild wx.wxscintilla, which you can do from the command-line from the bin dir (well, I tend to live in BlitzMax/bin, so I guess I'm used to it).

./bmk makemods -a wx.wxscintilla



Dabhand(Posted 2013) [#13]

You only need to rebuild wx.wxscintilla, which you can do from the command-line from the bin dir (well, I tend to live in BlitzMax/bin, so I guess I'm used to it).



lol, keep on forgetting that I can do the bmk thing... As you can tell, I rarely use it! :D

Cheers Mr B!

Dabz


Dabhand(Posted 2013) [#14]
Well, she.... Works!!! \o/

Nice going Brucey me auld fraggle! :)

Dabz


Brucey(Posted 2013) [#15]
Current SVN wxMax has now been tested on (K)ubuntu 12.10 (64-bit) and Fedora 17 (32-bit).

Samples are running on both, from the same static libraries. The libraries have been built with GCC 4.7.2 on Kubuntu. You will probably need a 4.7.x GCC for binary compatibility.

Fedora requires an extra link library (libpng15), which is not required on Ubuntu.
The file wx.mod/wx.mod/common.bmx can be changed if required to add/remove this dependency.
Since BlitzMax doesn't support a high degree pre-compiler options, I can't make the build more fine-tuned than simply to have a section called ?Linux..

Still, it works. Progress.


UNZ(Posted 2013) [#16]
OK,

BlitzMax has successfully compiled the module and most of the examples work
but the scintilla sample doesn't compile.
The output is
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent&)':
stc.cpp:(.text+0x87e): undefined reference to `wxStopWatch::TimeInMicro() const'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent&)':
stc.cpp:(.text+0x9f4): undefined reference to `wxStopWatch::TimeInMicro() const'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxStyledTextCtrl::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)':
stc.cpp:(.text+0x2387): undefined reference to `wxStopWatch::Start(long)'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxStyledTextCtrl::wxStyledTextCtrl(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)':
stc.cpp:(.text+0x2596): undefined reference to `wxStopWatch::Start(long)'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxBufferedDC::~wxBufferedDC()':
stc.cpp:(.text._ZN12wxBufferedDCD2Ev[_ZN12wxBufferedDCD5Ev]+0x14): undefined reference to `vtable for wxBufferedDC'
stc.cpp:(.text._ZN12wxBufferedDCD2Ev[_ZN12wxBufferedDCD5Ev]+0x20): undefined reference to `wxBufferedDC::UnMask()'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxBufferedDC::~wxBufferedDC()':
stc.cpp:(.text._ZN12wxBufferedDCD0Ev[wxBufferedDC::~wxBufferedDC()]+0x14): undefined reference to `vtable for wxBufferedDC'
stc.cpp:(.text._ZN12wxBufferedDCD0Ev[wxBufferedDC::~wxBufferedDC()]+0x20): undefined reference to `wxBufferedDC::UnMask()'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxBufferedPaintDC::wxBufferedPaintDC(wxWindow*, int)':
stc.cpp:(.text._ZN17wxBufferedPaintDCC2EP8wxWindowi[_ZN17wxBufferedPaintDCC5EP8wxWindowi]+0x4b): undefined reference to `vtable for wxBufferedPaintDC'
stc.cpp:(.text._ZN17wxBufferedPaintDCC2EP8wxWindowi[_ZN17wxBufferedPaintDCC5EP8wxWindowi]+0xee): undefined reference to `wxBufferedDC::UseBuffer(int, int)'
/home/aas/Proggen/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_stc-2.9.a(stclib_stc.o): In function `wxBufferedPaintDC::~wxBufferedPaintDC()':
stc.cpp:(.text._ZN17wxBufferedPaintDCD2Ev[_ZN17wxBufferedPaintDCD5Ev]+0xb): undefined reference to `vtable for wxBufferedPaintDC'
stc.cpp:(.text._ZN17wxBufferedPaintDCD2Ev[_ZN17wxBufferedPaintDCD5Ev]+0x13): undefined reference to `wxBufferedDC::UnMask()'
stc.cpp:(.text._ZN17wxBufferedPaintDCD2Ev[_ZN17wxBufferedPaintDCD5Ev]+0x44): undefined reference to `vtable for wxBufferedDC'
stc.cpp:(.text._ZN17wxBufferedPaintDCD2Ev[_ZN17wxBufferedPaintDCD5Ev]+0x50): undefined reference to `wxBufferedDC::UnMask()'


Because I can't try it out now I ask you:
- Are there methods like FormatTextAreaText(...) for the scintilla textarea?
(I'd like to implement my own highlighting)
- Is it possible to save the folding state for a file?
- Can you define what is foldable?


And although wxMax on linux runs pretty smooth now it is unuseable on windows...
The module compiles but on starting any program there is a (at least it feels like it) neverending list of errors.
And when I try to start the same sample again an error message appears because of incompatiblity with 64Bit Windows as if it would run as 16Bit application.

Is this just me or do others have these issue as well?

thx and regards

Last edited 2013

Last edited 2013

Last edited 2013


Brucey(Posted 2013) [#17]
wxMax … it is unuseable on windows


Well, xlsior is possibly the best positioned to answer that ;-)


As for the scintilla Linux sample, this is how it currently looks on my Fedora 17 VM..



This is with the latest SVN, using the provided static libraries (in wx.mod/lib), with GCC 4.7.x

You may want to make sure you have the latest code. There were a couple of issues with wxScintilla.


Brucey(Posted 2013) [#18]
Without reading the scintilla documentation, I couldn't give you a useful answer to your questions.


Brucey(Posted 2013) [#19]
On folding :

http://www.scintilla.org/ScintillaDoc.html#Folding

Of interest, is probably SetFoldLevel(line:Int, level:Int).

and there's a bunch of flags too, that relate to different parts of the folding mechanism, such as wxSCI_FOLDLEVELHEADERFLAG and friends.


Brucey(Posted 2013) [#20]
On highlighting :

http://www.scintilla.org/ScintillaDoc.html#SCN_STYLENEEDED

It appears you can set the lexer to wxSCI_LEX_CONTAINER, which will cause the editor to raise wxEVT_SCI_STYLENEEDED events, which you can then use to apply different styles (based on the event range) to the text.

Or so it seems.


UNZ(Posted 2013) [#21]
I had the issues with scintilla in 711
but everything seems to be perfect in revision 713.
Nice job Brucey! (wohoo!)


What do you mean with:
xlsior is possibly the best positioned to answer that


I'm not very good with riddles...

Last edited 2013

Last edited 2013

Last edited 2013


Brucey(Posted 2013) [#22]
Story is here.