Search found 1441 matches

by St_W
Nov 24, 2018 20:35
Forum: General
Topic: Using a DLL
Replies: 8
Views: 401

Re: Using a DLL

You are not providing an import library for your dll file, thus FreeBasic (or the GNU Linker "ld", to be more precise) creates a default one for you. And this obviously respects the library name as defined in the DLLs export directory (using dumpbin ConsoleInput.dll /exports ): Dump of fil...
by St_W
Nov 21, 2018 15:53
Forum: General
Topic: Coders
Replies: 52
Views: 1449

Re: Coders

Initializers in FB are limited, for example the issue with your first example is that you can't initialize variable-length strings in UDTs with an initializer. Excluding members from initialization isn't possible - at least I don't know a way to do so either. IMHO your proposed syntax is neither cle...
by St_W
Nov 21, 2018 14:30
Forum: General
Topic: Coders
Replies: 52
Views: 1449

Re: Coders

Munair wrote:BTW, it would be nice if FB would support syntax like [...]

Actually it does:

Code: Select all

type Typed64Bits
    value as string * 8
end type

dim s as Typed64Bits = ("testtest")

print s.value

see also https://freebasic.net/wiki/wikka.php?wakka=KeyPgDim ("initializers")
by St_W
Nov 21, 2018 8:18
Forum: Hardware Interfaces / Communication
Topic: Raspberry Pi and FreeBASIC
Replies: 18
Views: 3087

Re: Raspberry Pi and FreeBASIC

You can also install the latest Git build using these commands on RPi 2, 3 and higher: wget http://users.freebasic-portal.de/stw/builds/linux-armv7a-hf-debian/freebasic.deb wget http://users.freebasic-portal.de/stw/builds/freebasic-headers.deb sudo dpkg -i freebasic.deb sudo dpkg -i freebasic-header...
by St_W
Nov 21, 2018 1:53
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 429
Views: 60414

Re: Where can I get a Recent-Git-Build of FreeBASIC?

I've added a few build jobs to create & upload Debian package (.deb) files for the Linux builds. Those should simplify a default installation of freebasic on a Debian-based system (like Ubuntu or Raspbian). Only the latest version is available as of now and the files are overwritten when a new v...
by St_W
Nov 19, 2018 14:33
Forum: Linux
Topic: Best Distro for FB
Replies: 38
Views: 3114

Re: Best Distro for FB

Debian is focused on stability and security and thus often the latest version of an application is not available in its package repositories. If you want that use another distro, like Ubuntu, which is based on Debian but also provides recent application versions in its repositories (at the cost of s...
by St_W
Nov 16, 2018 13:37
Forum: Community Discussion
Topic: Have anyone an complete updated Freebasic?
Replies: 29
Views: 1653

Re: Have anyone an complete updated Freebasic?

I actually never used MINGW but it is also for Unix-like systems, apparently. I can install it directly from the software repository here on Manjaro Linux. It allows to cross compile applications on Linux for Windows. So you can create Windows applications on your Linux system. But you can't run th...
by St_W
Nov 16, 2018 8:40
Forum: Community Discussion
Topic: Have anyone an complete updated Freebasic?
Replies: 29
Views: 1653

Re: Have anyone an complete updated Freebasic?

http://users.freebasic-portal.de/stw/builds/ Note that these are really just the fbc builds containing only what's necessary to build fbc itself. As dodicat already suggested, if you're looking for a complete package I'd recommend to go with WinFBE suite, which includes 32-bit and 64-bit fbc from a...
by St_W
Nov 15, 2018 15:00
Forum: Projects
Topic: FBIde 0.4.6 r3 Avilable now
Replies: 77
Views: 23702

Re: FBIde 0.4.6 r3 Avilable now

dodicat wrote:I have the C source code for fbide

You have? I thought that it was lost (at least a significant part of it, only very old versions survived) and that's why development on fbide stopped back then?
by St_W
Nov 15, 2018 14:51
Forum: General
Topic: possible bug
Replies: 15
Views: 594

Re: possible bug

setjmp is implemented is part of the CRT and is implementation specific. Different systems, architectures or CRT implementations can use different datatypes for the jmp_buf parameter of that function. You seemed to link with an incompatible CRT, causing issues at link- or runtime.
by St_W
Nov 15, 2018 14:33
Forum: General
Topic: possible bug
Replies: 15
Views: 594

Re: possible bug

remove that function declaration entirely and replace calls to _setjmp by "setjmp" (without underscore).

edit: or better #define _setjmp setjmp on win32, not to break the implementation for other systems/architectures
by St_W
Nov 15, 2018 11:07
Forum: Projects
Topic: FBIde 0.4.6 r3 Avilable now
Replies: 77
Views: 23702

Re: FBIde 0.4.6 r3 Avilable now

ur_naz wrote:fbide is dead for 6 yrs

I think it's even longer, something > 10 years. It's a miracle why anybody would still want to use it nowadays as there are so many, so much better replacements available.
by St_W
Nov 14, 2018 11:27
Forum: General
Topic: (indirect) pointer type assignment/conversion
Replies: 14
Views: 321

Re: (indirect) pointer type assignment/conversion

As I've already written several times above, FB is statically typed. And that means that the type of p1 does not change. No matter what you assign to p1. Or to what type you cast the data you assign beforehands. It won't change. Never ever :-) p1 is an "any ptr". You can cast p1 to some ot...
by St_W
Nov 14, 2018 10:54
Forum: General
Topic: (indirect) pointer type assignment/conversion
Replies: 14
Views: 321

Re: (indirect) pointer type assignment/conversion

statically typed means that the type of a variable cannot change. In your example p1 = cast(any ptr, @first) does not change the type of p1. either you declare p1 as TFirst ptr or you cast p1 every time you want to use it as TFirst ptr: p1 = @first print cast(tFirst ptr, p1)->a '...
by St_W
Nov 14, 2018 10:46
Forum: General
Topic: (indirect) pointer type assignment/conversion
Replies: 14
Views: 321

Re: (indirect) pointer type assignment/conversion

FreeBasic is a statically typed language. So your example code is invalid. Instead, you need to either create a new variable that uses the appropriate pointer type or use casts everywhere. It wouldn't work in any other statically typed language (like C, C#, Java, ...) either. see also https://en.wik...

Go to advanced search