Search found 769 matches

by Landeel
Dec 09, 2020 16:49
Forum: General
Topic: UDT initializer : Invalid data types
Replies: 5
Views: 395

Re: UDT initializer : Invalid data types

Thanks, paul doe! I have added a constructor without parameters, so it will also work with redim: union colortype bgra as uinteger<32> type b as ubyte g as ubyte r as ubyte a as ubyte end type declare constructor(byval bgra as uinteger<32>=rgba(255,255,255,255)) declare constructor(as ubyte, as ubyt...
by Landeel
Dec 09, 2020 14:33
Forum: General
Topic: UDT initializer : Invalid data types
Replies: 5
Views: 395

Re: UDT initializer : Invalid data types

Hey Joshy, you gave me a great idea: union colortype bgra as uinteger<32> type b as ubyte g as ubyte r as ubyte a as ubyte end type declare constructor(byval bgra as uinteger<32>=rgba(255,255,255,255)) end union constructor colortype(byval bgra as uinteger<32>) this.bgra=bgra end constructor type my...
by Landeel
Dec 09, 2020 13:38
Forum: General
Topic: UDT initializer : Invalid data types
Replies: 5
Views: 395

UDT initializer : Invalid data types

union colortype bgra as uinteger<32> type b as ubyte g as ubyte r as ubyte a as ubyte end type end union type mytype clr as colortype=rgba(255,255,255,255) end type This code is obviously wrong, but it used to compile and work. With current git fbc, it gives me a: c.bas(12) error 24: Invalid data t...
by Landeel
Dec 07, 2020 21:21
Forum: Linux
Topic: Runtime error: libtinfo.so.5 not found
Replies: 10
Views: 1281

Re: Runtime error: libtinfo.so.5 not found

Do I just put them in the same directory as the executable and the program will read them from there instead of looking them up in the OS? No, that doesn't work on Linux. You would need a script to export 'LD_LIBRARY_PATH' and run your program. Not a very elegant solution, but many programs use it....
by Landeel
Dec 06, 2020 12:16
Forum: Linux
Topic: Runtime error: libtinfo.so.5 not found
Replies: 10
Views: 1281

Re: Runtime error: libtinfo.so.5 not found

I just copy "libtinfo.a" to "/usr/local/lib/freebasic/linux-x86_64", and it gets statically linked.
by Landeel
Nov 25, 2020 18:30
Forum: Linux
Topic: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5
Replies: 22
Views: 5416

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

The distributed compiler itself needs 'libtinfo.so.5', so "sudo apt-get install libtinfo5". If you want to prevent this from happening with your compiled programs, copy "libtinfo.a" to "/usr/local/lib/freebasic/linux-x86_64", and it will be statically linked. If you're ...
by Landeel
Oct 30, 2020 19:50
Forum: Tips and Tricks
Topic: quadput V2.0 (from Dr_D)
Replies: 2
Views: 976

Re: quadput V2.0 (from Dr_D)

Hey Joshy and Dr_D, this is pretty good.
A software renderer would come handy in my projects as an alternative to OpenGL.
Also, I could use this for better collision detection.
Mind if I borrow it? ;)
by Landeel
Oct 29, 2020 10:45
Forum: Community Discussion
Topic: Wetspot compiled to javascript
Replies: 23
Views: 6504

Re: Wetspot compiled to javascript

I'm curious. What does Cordova have to do with FB and Emscripten? Looks to me like it's simply another Javascript hybrid app development platform. Cordova can turn HTML/javascript into an Android app. So we could make Android apps using FreeBASIC. Just that. Sure it's not the best path, as it's bet...
by Landeel
Oct 22, 2020 13:56
Forum: Linux
Topic: ScreenInfo returns the wrong refresh rate
Replies: 2
Views: 401

Re: ScreenInfo returns the wrong refresh rate

user@landeel-ht3000:~$ xrandr Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384 DVI-I-0 disconnected primary (normal left inverted right x axis y axis) DVI-I-1 disconnected (normal left inverted right x axis y axis) HDMI-0 disconnected (normal left inverted right x axis y axis) HD...
by Landeel
Oct 22, 2020 12:50
Forum: Linux
Topic: ScreenInfo returns the wrong refresh rate
Replies: 2
Views: 401

ScreenInfo returns the wrong refresh rate

It will always return 50 on Linux.
I have reported the issue here: https://github.com/freebasic/fbc/issues/257
by Landeel
Oct 21, 2020 19:25
Forum: Linux
Topic: SETENVIRON
Replies: 16
Views: 1721

Re: SETENVIRON

fxm wrote:

Code: Select all

dim as string MYCOUNT="123"
SETENVIRON("COUNT=" & MYCOUNT)
print ENVIRON("COUNT") 'will return a NULL


Fails too!
by Landeel
Oct 21, 2020 19:05
Forum: Linux
Topic: SETENVIRON
Replies: 16
Views: 1721

Re: SETENVIRON

This works:

Code: Select all

dim as string MYCOUNT="COUNT=123"
SETENVIRON(MYCOUNT)
print ENVIRON("COUNT")


This fails:

Code: Select all

dim as string MYCOUNT="123"
SETENVIRON("COUNT=" + MYCOUNT)
print ENVIRON("COUNT") 'will return a NULL


Looks like a bug to me.
by Landeel
Jun 29, 2020 13:50
Forum: Linux
Topic: Linux freebasic portability issue
Replies: 8
Views: 1651

Re: Linux freebasic portability issue

Hey TeeEmCee! About ncurses, the problem is libtinfo, right? I had problems with it after I upgraded to Ubuntu 20.04. But copying 'libtinfo.a' to '/usr/local/lib/freebasic/linux-x86_64/' solved it for me. I don't know the internals, but this causes libtinfo to link statically. The reason I'm using D...
by Landeel
Jun 25, 2020 18:33
Forum: Projects
Topic: Iceroyds!
Replies: 48
Views: 11385

Re: Iceroyds!


Go to advanced search