Search found 250 matches

by TeeEmCee
Mar 03, 2018 2:41
Forum: Projects
Topic: fbfrog header translator
Replies: 52
Views: 9507

Re: fbfrog header translator

The GNU linker prefers to link .dlls over .a files. I would have thought that removing the .dll.a file would prevent that. Maybe you need to remove the .dll too?
Did the link errors you saw refer to the .dll or to the .a file?
by TeeEmCee
Mar 02, 2018 2:08
Forum: Community Discussion
Topic: no warning on missing constructor
Replies: 5
Views: 713

Re: no warning on missing constructor

What OS are you using? I assume Windows, because there's an extra leading underscore on the symbol name.
If you pass "-Wl --demangle" to fbc when compiling, does it demangle the name? What about "-Wl --demangle=gnu"?
by TeeEmCee
Mar 02, 2018 2:02
Forum: Tips and Tricks
Topic: gcc extended asm
Replies: 9
Views: 983

Re: gcc extended asm

Yes, fbc already does that and other processing for intel syntax. The suffixes added to variable names are quite annoying also when using a debugger. I think coderjeff or someone else has a fork which doesn't add those suffixes. I presume they're for scopes. But -gen gcc targets C99, not C89, and th...
by TeeEmCee
Mar 01, 2018 22:51
Forum: Tips and Tricks
Topic: gcc extended asm
Replies: 9
Views: 983

Re: gcc extended asm

It's too bad you have to add the quote marks, newlines and line continuations. fbc should be able to add them automatically, the way it does for -asm intel, but without needing to implement a parser like it has for intel syntax. Something like: function sqrt (byval x as double) as double dim as doub...
by TeeEmCee
Mar 01, 2018 20:55
Forum: Community Discussion
Topic: no warning on missing constructor
Replies: 5
Views: 713

Re: no warning on missing constructor

I don't see the problem. Not defining a constructor is a link-time error. It can't be caught while compiling any individual .bas file, because it could be defined in any other .bas file. So fbc can't print an error message, but the linker did. Although, it's strange that ld didn't demangle the symbo...
by TeeEmCee
Feb 25, 2018 9:11
Forum: General
Topic: dll ?
Replies: 9
Views: 678

Re: dll ?

or has c struct's ? I don't understand the question. But you said this dll is compiled with gcc (code::blocks), right? If so the classes can possibly be used from FB, as caseih said. I think that fbc does support C++ classes with overloaded operators, but that there is a problem just with the const...
by TeeEmCee
Feb 22, 2018 2:42
Forum: General
Topic: dll ?
Replies: 9
Views: 678

Re: dll ?

grindstone: You need to accept cookies. For translating a C header file to a FB one, I recommend using fbfrog . It's almost painless! Just compile fbfrog and run "fbfrog myheader.h" and it'll create a myheader.bi file. But that header contains C++ declarations, which *isn't* part of the li...
by TeeEmCee
Feb 21, 2018 3:04
Forum: Projects
Topic: fbcunit - fbc compiler unit testing component
Replies: 44
Views: 3488

Re: fbcunit - fbc compiler unit testing component

Other CPUs are another thing to consider I'm afraid I haven't tried out your cunit replacement or tested FB on an ARM in a long time, but just want to draw your attention to this relevant commit: commit 06cee30277a9a925e43af41e6d5a81c3410f52b1 Author: Ralph Versteegen <teeemcee@gmail.com> Date: Mon ...
by TeeEmCee
Feb 20, 2018 10:10
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

Sorry, haven't been around. Either you can edit the makefile directly, or you can create a config.mk file and place it next to makefile. (Or, you could even pass it on the commandline every time) I definitely recommend config.mk, because that way git won't see any local changes to makefile I have fb...
by TeeEmCee
Jan 20, 2018 0:48
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

You did ask before. See https://www.freebasic.net/forum/viewtopic.php?p=237909#p237909 and following replies. To summarise, make these module constructor and destructors: Maybe we should just use ctor/dtor priority 101 for the FB runtime, and disallow users from using priority 101. Then we can avoid...
by TeeEmCee
Jan 18, 2018 10:48
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

If ASC is called with a string literal then it can be evaluated at compile-time. Otherwise the call to the runtime has to be preserved. See cStrASC in parser-quirk-string.bas The same thing applies to other string and wstring functions including string concatenation (I'm not sure if all are optimise...
by TeeEmCee
Jan 17, 2018 9:39
Forum: Linux
Topic: How to use vt100 escape sequence for text color
Replies: 10
Views: 900

Re: How to use vt100 escape sequence for text color

It's because in FB PRINT does not output strings straight to stdout, instead there is a layer of indirection to handle COLOR, POS, etc; it escapes your escape codes so that they won't be interpreted by the terminal.
by TeeEmCee
Jan 13, 2018 9:29
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

OK, after building the mt variants I managed to compile fbc-tests (the cunit tests), but it freezes. I tried log-tests, and there are only 6 failures! This was done on my own branch before I merged your work. Wow, you've translated over half the rtlib now. Nice work! I merged our fixes and submitted...
by TeeEmCee
Jan 13, 2018 6:58
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

I'm sorry to disappoint you, but you're compiling the testsuite with the wrong copy of libfb, not fbrtlib. FB's testcases (at least the cunit ones) link to libfbmt.a, not libfb.a. Maybe you can run the logtests ones? The makefile I provided doesn't build libfbmt.a, but I'm adding it now. I assure yo...
by TeeEmCee
Jan 13, 2018 5:59
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15110

Re: Pure FB Runtime Library (in progress)

You haven't checked in the con_print_tty_uni.bas file yet. Anyway, what about warnings? There were quite a lot which indicated mistakes either in the translation, or in FB's CRT headers. Also, too late, I've already nearly fixed everything. (Edit: Imortis, you are too quick to add various casts to s...

Go to advanced search