Search found 2867 matches

by dkl
Mar 11, 2018 19:37
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 638
Views: 173827

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

Looks like "refreshing the repository" (sf.net/p/fbc - Code - Admin - Code - Refresh Repository) fixed it.
by dkl
Mar 02, 2018 17:40
Forum: Projects
Topic: fbfrog header translator
Replies: 59
Views: 29694

Re: fbfrog header translator

default.h belongs to fbfrog itself, it exists at include/fbfrog/default.h in the fbfrog source code. The include/ directory (with fbfrog/default.h in it) should be next to fbfrog.exe so it can be found. To support CURL_STATICLIB, you could try to save the following as curl.fbfrog: -declarebool CURL_...
by dkl
Feb 13, 2018 20:33
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

Re: compile-time bindgen for FB

Indeed, I was thinking of a standalone bindgen program; fbc can invoke it and read in the temporary .bi file. The special cases like symbol renaming would have to be specified as options somewhere (maybe in a wrapper .bi file, or an .ini file). All in all it shouldn't affect FB code any differently ...
by dkl
Jan 24, 2018 19:11
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

Re: compile-time bindgen for FB

Yea, all your points are correct. The library's header files would have to be available, together with the MinGW/system headers. Since it uses libclang it doesn't need a C compiler directly - just the headers. This is relatively easy on GNU/Linux, or if you have MinGW anyways because you had to comp...
by dkl
Jan 22, 2018 18:28
Forum: General
Topic: cpp ref call
Replies: 8
Views: 1650

Re: cpp ref call

Hi, there seem to be 3 issues here: 1. fbc uses wrong mangling according to Itanium C++ ABI: void foo(int a, int b) {} // _Z3fooii <- gcc and fbc match here (for the byval case) void foo(int &a, int &b) {} // _Z3fooRiS_ <- gcc uses S_ relational reference ("compression/substitution"...
by dkl
Jan 09, 2018 18:22
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

Re: compile-time bindgen for FB

Yea, I'm looking for help with the idea, someone else who works on it, because I won't have time to finish it by myself.
by dkl
Jan 07, 2018 21:03
Forum: Community Discussion
Topic: What's new since the last release awaiting in the night build?
Replies: 4
Views: 1404

Re: What's new since the last release awaiting in the night build?

Hi,

there is a changelog.txt that documents the not-yet-released changes in the section for the not-yet-released version 1.06.
by dkl
Dec 31, 2017 12:29
Forum: Beginners
Topic: Error "(null).dll was not found"
Replies: 5
Views: 1348

Re: Error "(null).dll was not found"

I think I saw this before with libfoo.dll.a import libraries when the LIBRARY "foo.dll" part was missing from the .def file passed to dlltool. In that case it depends on how the DLL and its import library (if any) are built. You could try running objdump (from MinGW-w64 toolchain) on the e...
by dkl
Dec 19, 2017 23:48
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

Re: compile-time bindgen for FB

Using "wrapper" .bi files to contain manually written declarations besides the #include_c/#bindgen keyword sounds like a great idea. Probably fbbindgen can just omit declarations that it can't translate. I think this would mostly help with complex macros/inline functions, but probably some...
by dkl
Dec 09, 2017 22:08
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

Re: compile-time bindgen for FB

Well, I've been experimenting with libclang in fbfrog (after finding a bug in fbfrog's custom CPP), and making it single-target only. It's close to a full rewrite: By using libclang, most of the existing C parsing code becomes obsolete and must be replaced with a libclang AST parser. And being singl...
by dkl
Dec 07, 2017 10:03
Forum: Community Discussion
Topic: compile-time bindgen for FB
Replies: 18
Views: 5549

compile-time bindgen for FB

Hi, FB bindings for C/C++ are a recurring issue, something I've been personally interested in, and spent a lot of time on. But no matter how good the .bi files are, they're always outdated... How about making a binding generator for FB that runs during .bas file compilation, like #include_c "fo...
by dkl
Nov 29, 2017 18:49
Forum: Projects
Topic: fbfrog header translator
Replies: 59
Views: 29694

Re: fbfrog header translator

Yea, fbfrog tries to parse all #includes, but currently it also ignores the ones that can't be found. It's somewhat useful for making .bi files for .h files that would normally use system headers, but without having the system headers. So fbfrog also resolves #ifdefs and macros, but the result can b...
by dkl
Nov 28, 2017 17:01
Forum: Projects
Topic: fbfrog header translator
Replies: 59
Views: 29694

Re: fbfrog header translator

I saved your source as nn.h and ran fbfrog like this: $ fbfrog nn.h -emit '*/nn.h' nn.bi [ 1/23] linux-x86 [ 2/23] linux-x86_64 [ 3/23] linux-arm [ 4/23] linux-aarch64 [ 5/23] freebsd-x86 [ 6/23] freebsd-x86_64 [ 7/23] freebsd-arm [ 8/23] freebsd-aarch64 [ 9/23] openbsd-x86 [10/23] openbsd-x86_64 [1...
by dkl
Nov 28, 2017 8:11
Forum: Projects
Topic: fbfrog header translator
Replies: 59
Views: 29694

Re: fbfrog header translator

It could be a problem with the -emit options, maybe it will work if you add a * wildcard:

Code: Select all

-emit 'nn.h' ./target/nn.bi
-emit '*/nn.h' ./target/nn.bi
Also it can help to try without any -emit.
by dkl
Nov 15, 2017 19:42
Forum: Windows
Topic: Cannot compile fbfrog
Replies: 3
Views: 1316

Re: Cannot compile fbfrog

fbfrog consists of multiple .bas files (the whole src/ folder), so fbfrog.bas alone is not enough. For current master, there is a makefile, or you can also do:
fbc src/*.bas -m fbfrog