Wxmax Linux

BlitzMax Forums/Brucey's Modules/Wxmax Linux

matty47(Posted 2008) [#1]
I have successfully compiled the wx module under Ubuntu 7.1 and tried to compile and run a couple of samples along with my own code. Unfortunately the listbox example and the following code both start to run but exit with an error 11. They do apparently keep running and try chew up 100% of cpu. The memory use also keeps increasing (talking about over 200mb - so it is easy to find the process in the System Monitor applet and kill it).
SuperStrict



'import the required modules

Import wx.wxApp

Import wx.wxFrame

Import wx.wxTextCtrl



'Set up our frame type that holds all our controls

Type MyFrame Extends wxFrame



	Const mOPEN:Int = 1

	Const mABOUT:Int = 100

	Const mEXIT:Int = 200

	

	Method OnInit() 

		'create a menu 

		Local fileMenu:wxMenu = wxMenu.CreateMenu() 

		fileMenu.Append(mOPEN, "&Open", "Open an existing file") 

		fileMenu.Append(mABOUT, "&About", "Who wrote this") 

		fileMenu.AppendSeparator() 

		fileMenu.Append(mEXIT, "E&xit", "Do you really have to go?") 

		'now create a menu bar to attach the menus to

		Local menuBar:wxMenuBar = New wxMenuBar.Create() 

		menuBar.Append(fileMenu, "&File") 

		' and set the menubar

		SetMenuBar(menuBar) 

		'create a statusbar with 3 sections

		CreateStatusBar(3) 

			 

	End Method

	

End Type

'now create our application

Type MyApp Extends wxApp

	'the window for our app

	Field Frame:MyFrame

	

	Method OnInit:Int() 

		Frame = MyFrame(New MyFrame.Create(,,"My Small Application"))

		'centre the frame on the screen

		Frame.Center() 

		'and show the window

		Frame.Show() 

		'and return true if we got to here ok

		Return True

	End Method

End Type



New MyApp.Run() 


The above code seems to run OK on WindowsXP.
I did svn the latest today and rebuilt the mod in the hope that there would be some change.
Is anyone else trying to use wx.mod on Linux and having these troubles? I had similar cpu / memory usage problems when using another gui mod that basically waited in a loop for something to happen. Funny though the menu sample runs OK. I must be missing something
Thanks
Matthew


plash(Posted 2008) [#2]
They do apparently keep running and try chew up 100% of cpu. The memory use also keeps increasing (talking about over 200mb - so it is easy to find the process in the System Monitor applet and kill it).

I'm getting the same exact thing in ubuntu 7.04, just did a svn and rebuilt last night.

What errors are you getting when you try to run it?

This is what I'm getting from aui in the samples (figured it would be best to test out all the features of wxmax)
/home/timhow/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_core-2.8.a(corelib_textctrl.o):(.rodata._ZTV10wxTextCtrl[vtable for wxTextCtrl]+0x368): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)'
/home/timhow/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_core-2.8.a(corelib_textcmn.o):(.rodata._ZTV14wxTextCtrlBase[vtable for wxTextCtrlBase]+0x368): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)'
/home/timhow/BlitzMax/mod/wx.mod/wx.mod/../lib/linux/libwx_gtk2u_core-2.8.a(corelib_treectlg.o):(.rodata._ZTV14wxTreeTextCtrl[vtable for wxTreeTextCtrl]+0x368): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)'
collect2: ld returned 1 exit status
Build Error: Failed to link /home/timhow/BlitzMax/mod/wx.mod/samples/aui.debug