Search found 1443 matches

by caseih
May 22, 2020 18:49
Forum: Community Discussion
Topic: GW-BASIC is open source now
Replies: 16
Views: 721

Re: GW-BASIC is open source now

The blog post about this is pretty interesting: https://devblogs.microsoft.com/commandline/microsoft-open-sources-gw-basic/ Apparently the interpreter was originally written in some assembly-like language and then translated to assembly for various platforms, not just 8086 and DOS. Sadly they aren't...
by caseih
May 21, 2020 1:25
Forum: General
Topic: C++ ABI Compatible?
Replies: 21
Views: 817

Re: C++ ABI Compatible?

I'm not totally sure what you mean. FB has its own idea of a vtable. I have no idea what that is, nor how it differs from GCC C++'s vtable implementation. If FB were to adopt the GCC vtable structure as its own, then perhaps more compatibility with C++ would be possible. And maybe it's already prett...
by caseih
May 07, 2020 18:51
Forum: Community Discussion
Topic: Why did you choose FreeBASIC?
Replies: 36
Views: 1773

Re: Why did you choose FreeBASIC?

I believe systemctl was complaining about the mentioning of and comparisons to Free Pascal. While I take his point (this is a forum for FreeBASIC after all), I find the comparisons with other languages to be useful. In many cases, the way Free Pascal does things could influence the way FreeBASIC doe...
by caseih
May 06, 2020 13:55
Forum: Beginners
Topic: Is it possible to use RUN to run a Linux terminal command
Replies: 5
Views: 196

Re: Is it possible to use RUN to run a Linux terminal command

Are you looking to simply run something in the background, or do you need to run it in a new terminal window, or do something like Gdebi where it shows the details of the command running in a widget?
by caseih
May 04, 2020 18:20
Forum: Community Discussion
Topic: fbfrog is unmaintained, so what is the current supported tool to translate C header?
Replies: 8
Views: 332

Re: fbfrog is unmaintained, so what is the current supported tool to translate C header?

Translating headers is hard. Partly because of complicated type definitions in C and partly because there's actually two full languages that have to be translated at once: the c preprocessor language and C itself. And the result of the preprocessor depends greatly on the environment in which it is r...
by caseih
May 04, 2020 13:51
Forum: Community Discussion
Topic: fbfrog is unmaintained, so what is the current supported tool to translate C header?
Replies: 8
Views: 332

Re: fbfrog is unmaintained, so what is the current supported tool to translate C header?

Sure, if you had a working FB compiler on those platforms, you could build fbfrog natively there. It's a pure FB program after all. fbfrog is just a header translator. It doesn't care what platform the header files it is parsing comes from. Could parse a windows library's .h files on Linux if you wa...
by caseih
May 04, 2020 3:29
Forum: Community Discussion
Topic: FreeBASIC and C++ interop current status?
Replies: 15
Views: 582

Re: FreeBASIC and C++ interop current status?

Indeed FBC does decorate method names and overloaded functions in the same way as gcc. However you need a lot more than that to interact with most C++ classes, particularly ones that involve virtual methods (polymorphism). That requires the ability to interact with C++ objects' vtables at runtime to...
by caseih
May 03, 2020 18:25
Forum: Tips and Tricks
Topic: The Simplest debug and trace method Win+Lin 32/64 bit
Replies: 7
Views: 434

Re: The Simplest debug and trace method

Just write your messages to standard out. Can use regular printf(). Or write them to standard error. That will never get overwritten by graphics frames or the like. And they can be redirected to a file for analysis also. Nearly all Unix applications write debugging messages this way. If you start th...
by caseih
May 03, 2020 3:24
Forum: Beginners
Topic: How to dynamic load a library?
Replies: 22
Views: 611

Re: How to dynamic load a library?

If Windows updates are done, the universal runtime dll should be present. Unlike earlier runtimes, this one is distributed through windows update.
by caseih
May 02, 2020 23:37
Forum: General
Topic: How to translate C headers contain gcc __attribute__?
Replies: 45
Views: 923

Re: How to translate C headers contain gcc __attribute__?

I wonder why FreeBASIC doesn't include headers for such an important library like OpenSSL, though. Could it be because lack of manpower? FB only has headers for libraries when contributors provide them. I think maybe two people did the majority of the .bi files that are currently shipped with FB, a...
by caseih
May 02, 2020 13:56
Forum: General
Topic: How to translate C headers contain gcc __attribute__?
Replies: 45
Views: 923

Re: How to translate C headers contain gcc __attribute__?

Looks like you're making great progress. Nearly all of the TODOs in that bi file look pretty easy to manually translate to FB. Are there particular ones that are tripping you up? C's for() statement is very different than FB's for. You'll have to translate that to a while loop. But there are going t...
by caseih
Apr 30, 2020 18:40
Forum: Beginners
Topic: How to dynamic load a library?
Replies: 22
Views: 611

Re: How to dynamic load a library?

I don't think the winver stuff has anything to do with it. The msvcrt dlls come in different flavors, with the version in the file name. msvcrt70.dll etc. These correspond to the Visual C compiler versions, not the windows versions. Unfortunately only certain versions ever shipped with the OS. Every...
by caseih
Apr 30, 2020 14:11
Forum: Beginners
Topic: How to dynamic load a library?
Replies: 22
Views: 611

Re: How to dynamic load a library?

So does FB load a version that is different from "msvcrt.dll"? Which version does it load then? Possibly. msvcrt.dll is very old--dates back to Visual Studio 6 days. It's still always available, though, for backwards compatibility. The version of msvcrt that FB uses depends on the version...

Go to advanced search