Page 2 of 42

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 11:38 am
by User_Russian
In this alpha version is the /PREPROCESS command not supported?

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 12:32 pm
by akee
Thanks Fed & PureBasic team... Looking forward to the release.

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 3:59 pm
by firace
I managed to compile one test program successfully, but now I keep getting the following error message:

Code: Select all

---------------------------
PureBasic
---------------------------
The compiler isn't loaded yet... please try again.
---------------------------
OK   
---------------------------
Any ideas? I did select the C compiler in the dropdown.

EDIT: Resolved! Entirely my mistake...

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 4:20 pm
by Ground0
I did some short tests... and wow amazing ... Mostly works until now fine with Wine and Linux (ASM and C backend Compiler) :-)

I hope the Linux Version is also soon ready.

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 7:55 pm
by Keya
Fred wrote: Wed May 19, 2021 10:08 am C Backend limitations:
- No Label address in datasection (?Label)
Does this render DataSection useless? (how to access data objects in the DataSection without a label?)

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 7:57 pm
by Fred
It only this syntax:

Code: Select all

Data.i ?Label
Which is not supported

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 8:21 pm
by StarBootics
Ground0 wrote: Wed May 19, 2021 4:20 pm II hope the Linux Version is also soon ready.
+1

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 9:15 pm
by mk-soft
Thank you Fred,

so we can start testing the basic functions early (and spezial function).

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 10:12 pm
by User_Russian
Many programs have this error when compiling

Code: Select all

purebasic.c:3783:1: warning: implicit declaration of function 'SYS_FastAllocateStringFree4'; did you mean 'SYS_FastAllocateString4'? [-Wimplicit-function-declaration]
And this (run with a debugger)

Code: Select all

purebasic.c:21893:2: error: unknown type name 'PUSH'

  PUSH esp

  ^~~~

purebasic.c:21894:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PUSH'

  PUSH dword PM_386

  ^~~~

...

                ^~~~~~~~~~~~~~~~~~~~~~~~
Unfortunately, I have not yet managed to get these errors on simple programs and I cannot post an example code on the forum.

Re: PureBasic 6.00 Alpha 1 released !

Posted: Wed May 19, 2021 10:26 pm
by User_Russian
Code

Code: Select all

!__attribute__((optimize("-Ofast")))
Procedure t()
EndProcedure
t()
Result

Code: Select all

// Procedure t()
static integer f_t() {
integer r=0;
// EndProcedure
end:
return r;
}
// 
...
...
...
...
// 
void ___chkstk_ms(integer a) { return; }
int __stdcall WinMain(void *instance, void *prevInstance, void *cmdLine, int cmdShow) {
PB_Instance = GetModuleHandleW(0);
PB_MemoryBase = HeapCreate(0,4096,0);
// !__attribute__((optimize("-Ofast")))
__attribute__((optimize("-Ofast")))
// t()
integer rr0=f_t();
SYS_Quit();
}
This does not work. Attribute does not apply to procedure!

Re: PureBasic 6.00 Alpha 1 released !

Posted: Thu May 20, 2021 12:44 am
by oreopa
Keya wrote: Wed May 19, 2021 7:55 pm
Fred wrote: Wed May 19, 2021 10:08 am C Backend limitations:
- No Label address in datasection (?Label)
Does this render DataSection useless? (how to access data objects in the DataSection without a label?)
I misinterpreted it the same way... but it's actually perfectly described in the text. ;)

Thanx Fred and team.

Re: PureBasic 6.00 Alpha 1 released !

Posted: Thu May 20, 2021 12:50 am
by Keya
oreopa wrote: Thu May 20, 2021 12:44 am I misinterpreted it the same way... but it's actually perfectly described in the text. ;)
Well I'm still confused about it - how to access data in DataSection when there's no ?label ?

Re: PureBasic 6.00 Alpha 1 released !

Posted: Thu May 20, 2021 12:58 am
by StarBootics
If I understand it correctly, something like this is not supported yet :

Code: Select all

DataSection
   VTable:
      Data.i ?Procedures ; <- This thing here
   Procedures:
      Data.i @Ceci(), @Cela()
  EndDataSection
Why you would like to do that ? I have no idea !

Best regards
StarBootics

Re: PureBasic 6.00 Alpha 1 released !

Posted: Thu May 20, 2021 12:59 am
by STARGÅTE
You can still use ?Label to get the address of a label: in a data section.
But you can not use (at the moment) such syntax "?Label" in a data section itself.

Re: PureBasic 6.00 Alpha 1 released !

Posted: Thu May 20, 2021 1:03 am
by Keya
STARGÅTE wrote: Thu May 20, 2021 12:59 am You can still use ?Label to get the address of a label: in a data section.
But you can not use (at the moment) such syntax "?Label" in a data section itself.
Ahh ok thankyou for clarifying, that makes sense. I think I've only used ?Label within a DataSection once anyway (for a jump table, which isn't important), so it seems 99% of my source code that uses DataSection should still work fine - cool! sorry to Fred for my misunderstanding