Reference: http://www.purebasic.fr/english/viewtop ... t=wxWidget
I don't know if its possible, or if there are sources available to do this but thought I would ask
I'm no good at the compiler stuff (beyond hitting compile in PB) and would be totally lost trying to figure it out..
But I would like to try updating the wxWidget wrapper for personal use (if it goes well, maybe for public) that was posted on the forum a while back, however it is based on a much older 2.x version and the accompanying library + binaries are, obviously, out of date.
I can't find an actual .lib anywhere, nor any active C API project with a download, but my google-fu is also not the best either..
I'm guessing I could try and fail miserably at trying to wrap the C++ API, but at least with the previous wrapper I would have something as a reference..
Can anyone compile an updated wxWidgets C.lib / DLL ??
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
It looks like the source is included so you can just use the includes or make a new userlib with tailbite
Windows 11, Manjaro, Raspberry Pi OS


-
Zach
- Addict

- Posts: 1678
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
That's the whole problem.
Those files are based on an older version of wxWidgets, which would include the wx-c.lib / dll that are in that package.
I'm trying to find a wx-c.lib & dll based on the current version of wxWidgets which is 3.0.1, so that I can use those source files as a base for trying to update things and include any new widgets, etc.
Those files are based on an older version of wxWidgets, which would include the wx-c.lib / dll that are in that package.
I'm trying to find a wx-c.lib & dll based on the current version of wxWidgets which is 3.0.1, so that I can use those source files as a base for trying to update things and include any new widgets, etc.
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
I think, there is no newer C.lib!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
Zach
- Addict

- Posts: 1678
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
could I still do it with a DLL alone?
What puzzles me is how the wx-c.dll was made / where it came from.
wx.NET seems to have a C binding, although I'm not sure what version its based on, off the top of my head.. Can't really seem to find -that- info..
Looking in the source packages structure
/wx.NET-0.9.2/src/wx-c
it has a bunch of source files that mirror the filenames of all the stuff in wx-PB's files (accel.cxx, activateevent.cxx, etc..)
It also comes with a wx-c-0-9-0-2.dll, and a bunch of .SO files (not sure what those are really) i.e "libwx-c-0-9-0-2.so".
Anyway as an example, there is these couple of lines in the accel.CXX source file for wx.NET
And then there is this in the accel.pbi file.
Pretty much all those keywords should be present in accel.cxx based on a quick glance over the code.
I'm guessing I would have to learn to translate all the code in the .cxx source files into PureBasic and then maybe I could use the wc-c-0-9-02.dll file or something.. Only hitch is wx-PB opens the wx-c.lib file with OpenLibrary; but I'm not sure if that is simply a matter of static vs dynamic linking and whether or not I really need it. Kind of like the way ProGUI worked? It had a user library, but you could also use it directly from the DLL with an included file which had similar definitions to stuff like inc.accel.pbi (the ProGUI_PB.pb file is full of definitions for Constants, Prototypes and Functions).
But then this would all be moot if its a much older version 2.x DLL anyway.
Is it even possible to wrap functions into PB if I could glean the necesarry info from C++ sources for wxWidgets 3.0.1 ? I thought I read something about Prototypes/pseudo-types/Interfaces being able to facilitate this in some way, but I am not sure 100%.. (Can you guys tell I am in way over my head? hehe...)
Oh well, at least it occupied me for a while
Goddamnit PrincieD why did you have to dissapear... ProGUI was shaping up to be so awesome
What puzzles me is how the wx-c.dll was made / where it came from.
wx.NET seems to have a C binding, although I'm not sure what version its based on, off the top of my head.. Can't really seem to find -that- info..
Looking in the source packages structure
/wx.NET-0.9.2/src/wx-c
it has a bunch of source files that mirror the filenames of all the stuff in wx-PB's files (accel.cxx, activateevent.cxx, etc..)
It also comes with a wx-c-0-9-0-2.dll, and a bunch of .SO files (not sure what those are really) i.e "libwx-c-0-9-0-2.so".
Anyway as an example, there is these couple of lines in the accel.CXX source file for wx.NET
Code: Select all
WXNET_EXPORT(wxAcceleratorEntry*)
wxAcceleratorEntry_ctor(int flags, int keyCode, int cmd, wxMenuItem* item)
{
return new wxAcceleratorEntry(flags, keyCode, cmd, item);
}
Code: Select all
ImportC"wx-c.lib"
wxAcceleratorEntry( flags , keyCode , cmd , item ) As "_wxAcceleratorEntry_ctor"
wxAcceleratorEntry_RegisterDisposable ( self , onDispose ) As "_wxAcceleratorEntry_RegisterDisposable"
wxAcceleratorEntry_dtor ( self ) As "_wxAcceleratorEntry_dtor"
wxAcceleratorEntry_Set ( self , flags , keyCode , cmd , item ) As "_wxAcceleratorEntry_Set"
wxAcceleratorEntry_SetMenuItem ( self , item ) As "_wxAcceleratorEntry_SetMenuItem"
wxAcceleratorEntry_GetFlags ( self ) As "_wxAcceleratorEntry_GetFlags"
wxAcceleratorEntry_GetKeyCode ( self ) As "_wxAcceleratorEntry_GetKeyCode"
wxAcceleratorEntry_GetCommand ( self ) As "_wxAcceleratorEntry_GetCommand"
wxAcceleratorEntry_GetMenuItem ( self ) As "_wxAcceleratorEntry_GetMenuItem"
wxAcceleratorEntry_GetAccelFromString ( label.s ) As "_wxAcceleratorEntry_GetAccelFromString"
wxAcceleratorTable( ) As "_wxAcceleratorTable_ctor"
wxAcceleratorTable_Ok ( self ) As "_wxAcceleratorTable_Ok"
EndImport
I'm guessing I would have to learn to translate all the code in the .cxx source files into PureBasic and then maybe I could use the wc-c-0-9-02.dll file or something.. Only hitch is wx-PB opens the wx-c.lib file with OpenLibrary; but I'm not sure if that is simply a matter of static vs dynamic linking and whether or not I really need it. Kind of like the way ProGUI worked? It had a user library, but you could also use it directly from the DLL with an included file which had similar definitions to stuff like inc.accel.pbi (the ProGUI_PB.pb file is full of definitions for Constants, Prototypes and Functions).
But then this would all be moot if its a much older version 2.x DLL anyway.
Is it even possible to wrap functions into PB if I could glean the necesarry info from C++ sources for wxWidgets 3.0.1 ? I thought I read something about Prototypes/pseudo-types/Interfaces being able to facilitate this in some way, but I am not sure 100%.. (Can you guys tell I am in way over my head? hehe...)
Oh well, at least it occupied me for a while
Goddamnit PrincieD why did you have to dissapear... ProGUI was shaping up to be so awesome
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
If you want a stand alone gui widget lib maybe IUP would be a better option
there are a couple of ports available for it but it's only native for linux and windows
osx requires X11 or gtk
there are a couple of ports available for it but it's only native for linux and windows
osx requires X11 or gtk
Windows 11, Manjaro, Raspberry Pi OS


-
Zach
- Addict

- Posts: 1678
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
I can't compile for Mac/OSX anyway.
I did not know about IUP. Has anyone used it in PB before? (always nice to have a starting point)..
I did not know about IUP. Has anyone used it in PB before? (always nice to have a starting point)..
Re: Can anyone compile an updated wxWidgets C.lib / DLL ??
Zach take a look here
http://www.purebasic.fr/german/viewtopi ... 11&t=26548
http://www.purebasic.fr/german/viewtopi ... 11&t=26548
Windows 11, Manjaro, Raspberry Pi OS


