wx pdf samples not working?
BlitzMax Forums/Brucey's Modules/wx pdf samples not working?
| ||
I cant compile the examples from the "wx.mod\samples\pdfdocument" folder. I get Linking:barcodes.debug.exe ..mypath/Blitzmax/mod/wx.mod/wx.mod/wx.debug.win32.x86.a(wxglue.cpp.debug.win32.x86.o):wxglue.cpp:(.text+0x2f5): undefined reference to `_wx_wxapp_wxApp__OnInit' ..mypath/Blitzmax/mod/wx.mod/wx.mod/wx.debug.win32.x86.a(wxglue.cpp.debug.win32.x86.o):wxglue.cpp:(.text+0x309): undefined reference to `_wx_wxapp_wxApp__OnExit' ..mypath/Blitzmax/mod/wx.mod/wx.mod/wx.debug.win32.x86.a(wxglue.cpp.debug.win32.x86.o):wxglue.cpp:(.text+0x355): undefined reference to `_wx_wxapp_wxAppMain__MainLoop' Build Error: Failed to link ..mypath/Blitzmax/mod/wx.mod/samples/pdfdocument/barcodes.debug.exe Process complete [EDIT] : I'm using the latest download version of wxWindows, wxmax_1_00_win32_bin.rar wxMax 1.00 - src + Win32 precompiled modules, and get the same error on a wxcodegen test I just made. Other examples work ok. |
| ||
That'll be my fault for under-documenting the samples... Try to run pdfdocument.bmx instead. |
| ||
Yes that one is tripping everyone up :-) |
| ||
Thanks! I get it now. I got my wxcodegen test working too by adding the code below to the wxcodegen output. Import wx.wxApp New MyApp.run() Type MyApp Extends wxApp Field frame:MyFrame1Base Method OnInit:Int() frame = MyFrame1Base (New MyFrame1Base .Create()) frame.Center() frame.Show() Return True End Method End Type |
| ||
You can also do something like :' ' Example application stub generated by wxCodeGen v1.08 : 13 Aug 2008 06:13:21 ' SuperStrict Framework wx.wxApp Import "generatedstuff.bmx" New MyApp.run() Type MyApp Extends wxApp Method OnInit:Int() ' Add frame creation code here Local frame:MyFrame1 = MyFrame1 (New MyFrame.Create()) Return True End Method End Type Type MyFrame1 Extends MyFrame1Base Method OnInit() Super.OnInit() ' Add own initialisation code here End Method End Type Note, that you can Import the generated code. This has the advantage of you being able to re-generate the code any time without you losing any of your own hand-coded stuff. Also, you may want to extend the generated Base type in order to implement/override the generated Event handler stubs, etc. |
| ||
Clever. I'll do it like that. |