BASIC(modified B++ complier) + wxWidgets
Re: BASIC(modified B++ complier) + wxWidgets
nm.exe can open the wxwidget static libs OK.
The mention of C++ puts a terrible fear into freebasic lib people.
but if nm.exe can show the list of functions in each .a file, perhaps these functions could be called via freebasic.
I'll experiment tomorrow with some simple ones.
The mention of C++ puts a terrible fear into freebasic lib people.
but if nm.exe can show the list of functions in each .a file, perhaps these functions could be called via freebasic.
I'll experiment tomorrow with some simple ones.
Re: BASIC(modified B++ complier) + wxWidgets
to be frank, the modified B++ compiler seems to have the ability to use any wxWdigest's control in a very simple way - just write a little in Cpp include file - which is attractive.
Re: BASIC(modified B++ complier) + wxWidgets
Oh so according to you, every language that has the stupid BASIC moniker in its name, is automagically related to FreeBasic? Do you see QB64 code here? Or PowerBasic? Or Vb.Net?oyster wrote:...
As for this modified B+ BASIC project, I think it is about BASIC language, so it has some relation to freebasic.
...
And this is an example of flawed logic at its best. The topic shouldn't be deleted for the (admittedly weak) reasons you cite, but because it's in the wrong forum. As simple as that. If you can't wrap your head around that concept, then you may try wrapping wxWidgets instead, so it can be used through a C-like interface. That way you could stop beetching about the things that FreeBasic can't do, and instead focus on what can be achieved with it right now, for a healthy change.oyster wrote: ...
There has already been topics here which are actually have nothing to do freebasic, why nobody claims to delete them before? Let me guess the reason
- you have never met the author before
or
- you are afraid that this modified B+ BASIC can get more focus then freebasic does. Come on, this modified B+ BASIC is far from mature and I doubt whether it can cover a full BASIC syntax for realy applications in years. Just relax or make freebasic can support up-to-date wxWidgets to defeat this modified B+ BASIC.
Re: BASIC(modified B++ complier) + wxWidgets
personally i don't care but man have a right!
Oh so according to you, every language that has the stupid BASIC moniker in its name, is automagically related to FreeBasic
Re: BASIC(modified B++ complier) + wxWidgets
The file libwxzlib.a (32 bits tested) from wxwidgets " . . .wxWidgets-3.1.3.StaticLibs\lib\gcc_lib32" works OK with FreeBASIC.(With a few name changes)
This file was written in C++ as far as I know.
code:
result:
I haven't tested any others yet.
This file was written in C++ as far as I know.
code:
Code: Select all
#inclib "wxzlib"
Extern "C"
Declare Function wx_zlib_compressBound(Byval sourceLen As Ulong) As Ulong
Declare Function wx_zlib_uncompress(Byval dest As Ubyte Ptr, Byval destLen As Uinteger Ptr, Byval source As Ubyte Ptr, Byval sourceLen As Ulong) As Long
Declare Function wx_zlib_compress(Byval dest As Ubyte Ptr, Byval destLen As Uinteger Ptr, Byval source As Ubyte Ptr, Byval sourceLen As Ulong) As Long
End Extern
Function getpassedinfo(text As String,Byref passed_length As Integer) As String
Dim As String var1,var2
Dim As Integer pst
#macro splice(stri,char,var1,var2)
pst=Instr(stri,char)
var1="":var2=""
If pst<>0 Then
var1=Mid(stri,1,pst-1)
var2=Mid(stri,pst+1)
Else
var1=stri
End If
#endmacro
splice(text,"|",var1,var2)
text=var2
passed_length=Valint(var1)
Return text
End Function
'================= UNPACK ===============
Function unpack(file As String) As String
Dim As Integer passed_length
Dim As String text=getpassedinfo(file,passed_length)
Dim As Integer stringlength,destinationlength
stringlength=Len(text)
destinationlength =passed_length
Dim As Ubyte Ptr source
Dim As Ubyte Ptr destination =Callocate(destinationlength,1)
source=@text[0]
Var mistake=wx_zlib_uncompress(destination,@destinationlength, source, stringlength)
If mistake<>0 Then Print "There was an error":Sleep:End
Dim As String uncompressed
uncompressed=String(destinationlength,0)
For i As Integer = 0 To destinationlength- 1
uncompressed[i]=(destination[i])
Next
Deallocate destination
Return uncompressed
End Function
'=================== PACK ============
Function pack(file As String) As String
Dim As String text=file
Dim As Integer stringlength,destinationlength
stringlength=Len(text)
destinationlength = wx_zlib_compressBound(stringlength)
Dim As Ubyte Ptr source
Dim As Ubyte Ptr destination =Callocate(destinationlength,1)
source=@text[0]
Var mistake=wx_zlib_compress(destination, @destinationlength, source, stringlength)
If mistake <>0 Then Print "There was an error"
Dim As String compressed
compressed=String(destinationlength,0)
For n As Integer=0 To destinationlength-1
compressed[n]=destination[n]
Next n
compressed=stringlength &"|"+compressed
Deallocate destination
Return compressed
End Function
#include "crt.bi"
dim as string s="ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"
s+=s
puts s
puts !"\n"
var c=pack(s)
puts c
var u= unpack(c)
puts !"\n"
puts u
sleep
Code: Select all
ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789
70|xostrvqus÷ðôòöñõó
?^O2426153·°t$¬
ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789
-
- Posts: 31
- Joined: Aug 16, 2018 2:00
Re: BASIC(modified B++ complier) + wxWidgets
I am a BASIC lover.
I hope BASIC can popular like before, and alive on every platform.
I am not a software architect, I just want to do something for BASIC world, and not waiting for BASIC going to die.
I hope a team or a group can do anything for me for us. i just happping to write code only.
But...
I am a normal salaryman, i need to work, and after working i need to play with my daughter(Kaya),
i have no enough time to do all of the dreams. I just do what i can do.
Sorry FreeBASIC team, sorry FreeBASIC fans.
you can delete this thread.(i don't known how to delete topic)
I hope BASIC can popular like before, and alive on every platform.
I am not a software architect, I just want to do something for BASIC world, and not waiting for BASIC going to die.
I hope a team or a group can do anything for me for us. i just happping to write code only.
But...
I am a normal salaryman, i need to work, and after working i need to play with my daughter(Kaya),
i have no enough time to do all of the dreams. I just do what i can do.
Sorry FreeBASIC team, sorry FreeBASIC fans.
you can delete this thread.(i don't known how to delete topic)
Re: BASIC(modified B++ complier) + wxWidgets
thank you for the test.dodicat wrote:The file libwxzlib.a (32 bits tested) from wxwidgets " . . .wxWidgets-3.1.3.StaticLibs\lib\gcc_lib32" works OK with FreeBASIC.(With a few name changes)
This file was written in C++ as far as I know.
#inclib "wxzlib"
I haven't tested any others yet.
But CPP compiler will use name mangling to give a unique name for functions, and what is more worse, different compilers take different manners during renaming.
Why we can find this kind of man-readable name in wxzlib? Maybe `extern "C" ` is used in the CPP code just like what you have done in the freebasic code.
If you check other files, especially for the GUI part, in wxWidgets, for example, libwxmsw31u_core.a, you can find something like following which make it hard to be used via loading DLL directly.
Code: Select all
0016A86E _ZThn656_N14wxFileListCtrlD1Ev
0016AAEA _ZThn656_N14wxFileListCtrlD0Ev
0016AD66 _ZThn656_N14wxDataViewCtrlD1Ev
0016AFE2 _ZThn656_N14wxDataViewCtrlD0Ev
Re: BASIC(modified B++ complier) + wxWidgets
And you thought fracturing the existing community rather than joining an existing team was then a good idea?kankouhin7937 wrote:I am a BASIC lover.
I hope BASIC can popular like before, and alive on every platform.
I am not a software architect, I just want to do something for BASIC world, and not waiting for BASIC going to die.
Re: BASIC(modified B++ complier) + wxWidgets
In light of this, I think we can lock this thread. If you wish to continue with the wxWidgets discussion, you can make a new thread in the Libraries section.kankouhin7937 wrote:I am a BASIC lover.
I hope BASIC can popular like before, and alive on every platform.
I am not a software architect, I just want to do something for BASIC world, and not waiting for BASIC going to die.
I hope a team or a group can do anything for me for us. i just happping to write code only.
But...
I am a normal salaryman, i need to work, and after working i need to play with my daughter(Kaya),
i have no enough time to do all of the dreams. I just do what i can do.
Sorry FreeBASIC team, sorry FreeBASIC fans.
you can delete this thread.(i don't known how to delete topic)