Search found 1599 matches

by St_W
Feb 19, 2022 13:48
Forum: Community Discussion
Topic: Where is such magics defined?
Replies: 5
Views: 737

Re: Where is such magics defined?

Everything you're asking for is described in the official documentation: https://www.freebasic.net/wiki/FBWiki In my opinion it's also pretty easy to find. For example if you're wondering what a constructor is just read the Key Page " Constructor ". I do agree that the search implementatio...
by St_W
Feb 19, 2022 13:12
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52363

Re: FreeBASIC 1.09.0 Release

Using Ubuntu is fine I guess as it's probably the most common Linux distro (although I'd probably choose Debian for building). Always upgrading to the latest version makes sense from a developer perspective, but doesn't so much from a build-system perspective. The reason for that is that builds are ...
by St_W
Feb 19, 2022 12:51
Forum: Linux
Topic: FreeBasic Raspberry Pi OS Bullseye
Replies: 13
Views: 3994

Re: FreeBasic Raspberry Pi OS Bullseye

That looks like a good choice. The recent release date for the 32-bit legacy version just shows that it still gets (security) updates. And I think going one major release back is a good compromise between compatibility and availability of modern features. Unfortunately there are no usage statistics ...
by St_W
Feb 19, 2022 12:32
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

I wrote something similar to this in some other thread recently: FreeBasic uses the same technical basis for compilation units and linking as C does, thus we also get the same complexity. Not sure if it can be reasonably simplified (at least as soon as something isn't working you need to dig into th...
by St_W
Feb 19, 2022 11:56
Forum: Windows
Topic: How to use WinMain with FreeBASIC?
Replies: 9
Views: 1403

Re: How to use WinMain with FreeBASIC?

In FreeBasic (just like in C/C++) you have to declare a function, because the compiler is a single-pass one and doesn't look ahead for potential methods following later in the code. And that's exactly what the example code does first. What is does next is calling the END method with the return value...
by St_W
Feb 19, 2022 11:47
Forum: Linux
Topic: FreeBasic Raspberry Pi OS Bullseye
Replies: 13
Views: 3994

Re: FreeBasic Raspberry Pi OS Bullseye

I'd recommend choosing the official OS for the Raspberry, Raspberry Pi OS (debian based) for the next official build instead of the third-party OS Ubuntu, which is rather untypical for the Pi (the resulting build would've worked on Ubuntu as well). Not taking the latest version, but e.g. going one m...
by St_W
Feb 18, 2022 12:24
Forum: Beginners
Topic: Remake functions from Autoit to FreeBASIC
Replies: 6
Views: 733

Re: Remake functions from Autoit to FreeBASIC

Maybe a few pointers to get you started: for function see https://www.freebasic.net/wiki/KeyPgFunction note that you need to specify data types (String in your case) explicitly and that FreeBasic doesn't allow variables starting with a dollar sign ($), neither does it have type pre/suffixes (for nam...
by St_W
Feb 17, 2022 20:44
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

Thanks for trying out with the Microsoft Linker and reporting the results. So we now know that is doesn't do magic either :-) Does this imply that you have a Masm32 installation, or is the linker happy with the FreeBasic libraries? It seems to me that the latter is correct; at least my FB version (w...
by St_W
Feb 17, 2022 19:51
Forum: Linux
Topic: FreeBasic Raspberry Pi OS Bullseye
Replies: 13
Views: 3994

Re: FreeBasic Raspberry Pi OS Bullseye

If you have a 32-bit version of Pi OS you need binaries built for the "armhf" architecture. This applies to the "FreeBASIC-1.09.0-linux-arm" or "FreeBASIC-1.09.0-raspian9-arm" build, which are binary identical btw (not sure why they exist under two different names). Ras...
by St_W
Feb 17, 2022 18:34
Forum: Community Discussion
Topic: Bye Bye
Replies: 41
Views: 3573

Re: Bye Bye

I don't think operator+ is arrogant, probably young and impatient. Why be abusive to new members. Sorry, probably chose the wrong word here (keep in mind, I'm not an English native, as many other people here as well). What I wanted to point out is that criticizing without trying to find solutions a...
by St_W
Feb 17, 2022 16:31
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

I'm not too fluent in assembly, but this sounds weird to me. Why should you load the address into eax when it's not used by the method afterwards? And if it's used by the method this definitely doesn't sound like stdcall, as with stdcall nothing is passed in registers, but everything is passed on th...
by St_W
Feb 17, 2022 16:08
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

I'm not sure whether the Microsoft Linker really doesn't care or, instead implicitly loads the libraries. It can do so, because the MasmBasic library contains according linker directives for the Microsoft Linker, which the GNU Linker probably doesn't understand: Linker Directives ----------------- -...
by St_W
Feb 17, 2022 14:46
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

#inclib "MasmBasic" #inclib "Shell32" #inclib "Gdi32" #inclib "Comdlg32" #inclib "Ole32" #inclib "masm32" extern "windows" Declare Sub Float2Asc lib "MasmBasic" (byval arg1 as any ptr, byval arg2 as long, byval arg3 as ...
by St_W
Feb 17, 2022 13:54
Forum: General
Topic: Using a static library: linker problems
Replies: 48
Views: 3869

Re: Using a static library: linker problems

Are you sure you're declaring the function in FreeBasic with the correct calling convention? I guess that the exported functions in your library use a different name decoration and thus the linker can't find them. This is often a hint that the used calling convention is not correct, as these use dif...
by St_W
Feb 17, 2022 13:29
Forum: Community Discussion
Topic: Bye Bye
Replies: 41
Views: 3573

Re: Bye Bye

FreeBASIC is a low-level programming language, very much comparable to C. As soon as you want to do enhanced stuff like using external libraries it uses the same techniques as C and thus has similar complexity. It's only simpler than C if you're just using the FB-internal runtime/gfxlib libraries. D...