Yes! Downloaded it already. Ganz toll, sehr güt, vielen Dank!MOD wrote:From today we have new builds from Git on FreeBASIC Portal.
For now, it's a transitional solution (in ger. "Übergangslösung",). They're not daily builds and DOS is missing, but I try to compile and upload new versions right after changes are submitted to the fbc repo.
Where can I get a Recent-Git-Build of FreeBASIC?
Re: Where get a Recent-Git-Build of FreeBASIC?
Re: Where get a Recent-Git-Build of FreeBASIC?
I compiled by hand in console: no problem here (windows 7 pro).MOD wrote:I'm not sure that's happening there. You could try to use -R and check, if the main() is emitted. Or -v to check the main module.
Maybe it's a problem of your IDE. Try to compile by hand in console.
This is the output I am getting (aside: using -exx or -g does not alter the outcome, it's all good).
Code: Select all
LoopAis on iteration 1
LoopBis on iteration 1
LoopAis on iteration 2
LoopBis on iteration 2
LoopAis on iteration 3
LoopBis on iteration 3
LoopAis on iteration 4
LoopBis on iteration 4
LoopAis on iteration 5
LoopBis on iteration 5
LoopAis on iteration 6
LoopBis on iteration 6
LoopAis on iteration 7
LoopBis on iteration 7
LoopAis on iteration 8
LoopBis on iteration 8
LoopAis on iteration 9
LoopBis on iteration 9
LoopAis on iteration 10
LoopBis on iteration 10
All done (and without Dim Shared!)
Re: Where get a Recent-Git-Build of FreeBASIC?
Yes, it works!MOD wrote:Try to compile by hand in console.
In fact, I found that the compiler error is linked with the length of the path:
"d:\Documents and Settings\t0003830\Mes documents\fbc0.24_windows20120104\fbc.exe" "d:\Documents and Settings\t0003830\Mes documents\FBIde0.4.6\FBIDETEMP.bas" -exx
does not work,
else:
"d:\Documents and Settings\t0003830\Mes documents\fbc0.24_windows20120104\fbc.exe" "d:\Documents and Settings\t0003830\Mes documents\FBIde\FBIDETEMP.bas" -exx
works!
I do not understand because all my other programs with the previous build (fbc 0.23.0) compiled fine with this first path!
and even with a path + 3 characters: 'FBIde0.4.6r3+'
Re: Where get a Recent-Git-Build of FreeBASIC?
It was a bug in 0.24 that I introduced when making some file name handling changes last year. The main module name was getting cut off internally, causing the input .bas to not be treated as the main module. That's fixed now.
So, thanks for testing 0.24 guys!
So, thanks for testing 0.24 guys!
Re: Where get a Recent-Git-Build of FreeBASIC?
Thank you dkl and AGS
Except this little problem above, everything seems to work perfectly!
I am testing only the Windows build.
Except this little problem above, everything seems to work perfectly!
I am testing only the Windows build.
Re: Where get a Recent-Git-Build of FreeBASIC?
I do not understand your remark above.AGS wrote:But I don't get the without Dim Shared: I thought Dim Shared was needed to make sure your code is thread safe ;)
Re: Where get a Recent-Git-Build of FreeBASIC?
Scroll down the code block :)fxm wrote:I do not understand your remark above.AGS wrote:But I don't get the without Dim Shared: I thought Dim Shared was needed to make sure your code is thread safe ;)
Re: Where get a Recent-Git-Build of FreeBASIC?
I've just compiled and uploaded the new builds. Thx dkl :)
Re: Where get a Recent-Git-Build of FreeBASIC?
dkl wrote:It was a bug in 0.24 that I introduced when making some file name handling changes last year. The main module name was getting cut off internally, causing the input .bas to not be treated as the main module. That's fixed now.
Ok now with this today build and my very long path of module name!MOD wrote:I've just compiled and uploaded the new builds. Thx dkl :)
Thank you both.
Re: Where get a Recent-Git-Build of FreeBASIC?
I ran again a few tests in OOP with this new Git-Build and I found again, among the deflects, the two major identified as bugs that I previously reported in May 2011 in this other topic:
http://www.freebasic.net/forum/viewtopi ... 17&t=17571
- When we define an instance of a child type, the compiler does not test if the parent type(s) has(have) a default constructor:
http://www.freebasic.net/forum/viewtopi ... 41#p157841
- Private/Protected access control versus member procedure/data:
OK for member procedure,
NOK for member data (both access controls following the same rule corresponding to Protected access control specification):
http://www.freebasic.net/forum/viewtopi ... 52#p161652
It would be nice for the future version 0.24, that the main bugs at least were fixed + documentation updated with the 4 new keywords ('Extends', 'Object', 'Base', 'Is'), and eventually new other OOP features!
It seems that everything has stopped on this since May:
v1ctor can he return to this subject (or someone else)?
Annex:
Just a small example whose the sole interest is the use of the four new keywords for OOP ('Extends', 'Object', 'Base', 'Is'):
http://www.freebasic.net/forum/viewtopi ... 17&t=17571
- When we define an instance of a child type, the compiler does not test if the parent type(s) has(have) a default constructor:
http://www.freebasic.net/forum/viewtopi ... 41#p157841
- Private/Protected access control versus member procedure/data:
OK for member procedure,
NOK for member data (both access controls following the same rule corresponding to Protected access control specification):
http://www.freebasic.net/forum/viewtopi ... 52#p161652
It would be nice for the future version 0.24, that the main bugs at least were fixed + documentation updated with the 4 new keywords ('Extends', 'Object', 'Base', 'Is'), and eventually new other OOP features!
It seems that everything has stopped on this since May:
v1ctor can he return to this subject (or someone else)?
Annex:
Just a small example whose the sole interest is the use of the four new keywords for OOP ('Extends', 'Object', 'Base', 'Is'):
Code: Select all
Type animal Extends Object ' 'Extends' to activate Run-Time Type Info (RTTI) by inheritance of the predefined Object type
Declare Function TypeInstance () As String
Declare Function TypeHierarchy () As String
End Type ' type may be member data empty
Function animal.TypeHierarchy () As String
Return "object(forRTTI) <- animal"
End Function
Type dog Extends animal ' 'Extends' to inherite of animal
Declare Function TypeHierarchy () As String
End Type ' type may be member data empty
Function dog.TypeHierarchy () As String
Return Base.TypeHierarchy & " <- dog" ' 'Base.' allows to access to parent member function
End Function
Type cat Extends animal ' 'Extends' to inherite of animal
Declare Function TypeHierarchy () As String
End Type ' type may be member data empty
Function cat.TypeHierarchy () As String
Return Base.TypeHierarchy & " <- cat" ' 'Base.' allows to access to parent member function
End Function
Function animal.TypeInstance () As String ' must be put after definition of dog type and cat type
If This Is dog Then ' 'Is' allows to compare with type symbol
Return "dog"
Elseif This Is cat Then ' 'Is' allows to compare with type symbol
Return "cat"
Else
Return "animal"
End If
End Function
Print "Name:", "Instance of:", , "Hierarchy:"
Dim mouse As animal
Print " mouse",
Print " " & mouse.TypeInstance, ,
Print " " & mouse.TypeHierarchy
Dim Buddy As dog
Print " Buddy",
Print " " & Buddy.TypeInstance, ,
Print " " & Buddy.TypeHierarchy
Dim Tiger As cat
Print " Tiger",
Print " " & Tiger.TypeInstance, ,
Print " " & Tiger.TypeHierarchy
Sleep
Last edited by fxm on Jan 11, 2012 11:41, edited 1 time in total.
Re: Where get a Recent-Git-Build of FreeBASIC?
Now let's be serious!TJF wrote:Scroll down the code block :)fxm wrote:I do not understand your remark above.AGS wrote:But I don't get the without Dim Shared: I thought Dim Shared was needed to make sure your code is thread safe ;)
I think that 'Dim Shared' is a method for beginners to pass variables to a thread.
With 'Threadcreate', it is best to use the 'Byval As Any Ptr' argument as a pointer to a data structure (UDT, array, ...).
See my previous other post (including 3 proposed syntaxes in examples):
http://www.freebasic.net/forum/viewtopi ... 51#p167651
In the example of the manual (KeyPgThreadCall), one of the data is a common mutex handle ('Any Ptr') in order to synchronize threads between themselves.
In the version using 'Threadcreate' + UDT structure, as presently no static member data can be defined, an emulation of a static member data may be used as following:
Code: Select all
' Threading using "ThreadCreate" + UDT untyped pointer
Type thread_data
Dim id As String
Dim count As Integer
Declare Static Function tlock (Byval param As Any Ptr = 0) As Any Ptr
End Type
Static Function thread_data.tlock (Byval param As Any Ptr = 0) As Any Ptr
Static p As Any Ptr
p = Iif(param > 0, param, p)
Function = p
End Function
Sub thread( Byval param As Any Ptr )
With *Cast(thread_data Ptr, param)
For i As Integer = 1 To .count
MutexLock .tlock
Print "thread "; .id, i; "/"; .count
MutexUnlock .tlock
Next
End With
End Sub
thread_data.tlock(MutexCreate())
Dim pA As thread_data Ptr = New thread_data
pA->id = "A"
pA->count = 6
Dim a As Any Ptr = ThreadCreate(@thread, pA)
Dim pB As thread_data Ptr = New thread_data
pB->id = "B"
pB->count = 4
Dim b As Any Ptr = ThreadCreate(@thread, pB)
ThreadWait a
ThreadWait b
MutexDestroy thread_data.tlock
Delete pA
Delete pB
Print "All done (and also without Dim Shared!)"
Sleep
Last edited by fxm on Jan 13, 2012 12:03, edited 1 time in total.
Re: Where get a Recent-Git-Build of FreeBASIC?
Here are some examples:
And what an Object? :
Code: Select all
Type One extends OBJECT
a As Integer = 1234
End Type
Code: Select all
Type OBJECT
'What is here?
End Type
Re: Where get a Recent-Git-Build of FreeBASIC?
'Object' is a predefined type which allows (by inheritance) to access to the Run-Time Type Info (RTTI), authorizing the use of the new keyword 'Is' to compare 'This' with type symbols.
See my short example above:
http://www.freebasic.net/forum/viewtopi ... 02#p169002
See my short example above:
http://www.freebasic.net/forum/viewtopi ... 02#p169002
Re: Where get a Recent-Git-Build of FreeBASIC?
Yes, a good example, but I did not at once realize it :) Thanks
Re: Where get a Recent-Git-Build of FreeBASIC?
I have a problem testing the last Git-build of FreeBASIC (05.02.2012) at:
http://www.freebasic-portal.de/download ... uilds.html
Compiler output:
D:\Prg\FXM\fbc0.24_windows20120205\FBIDETEMP.bas() error 79: Executable not found: "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\as.exe"
This path "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\as.exe" is erroneous.
(instead of "D:\Prg\FXM\fbc0.24_windows20120205\bin\as.exe" or "D:\Prg\FXM\fbc0.24_windows20120205\bin\win32\as.exe" as for official version)
In addition, I think there is other defects!
(if I put the 'bin' directory in "D:\Prg\FXM\", I obtain: error 79: Executable not found: "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\windres.exe"
http://www.freebasic-portal.de/download ... uilds.html
Compiler output:
D:\Prg\FXM\fbc0.24_windows20120205\FBIDETEMP.bas() error 79: Executable not found: "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\as.exe"
This path "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\as.exe" is erroneous.
(instead of "D:\Prg\FXM\fbc0.24_windows20120205\bin\as.exe" or "D:\Prg\FXM\fbc0.24_windows20120205\bin\win32\as.exe" as for official version)
In addition, I think there is other defects!
(if I put the 'bin' directory in "D:\Prg\FXM\", I obtain: error 79: Executable not found: "D:\Prg\FXM\fbc0.24_windows20120205\..\bin\windres.exe"