Compile just gives no error.
Run then gives the following error.
I can't get around the error
PureBasic - Assembler Error
"error: unknown type name 'i_iwindowstrcut'; did you mean 's_windowstruct'?
7373 | i_iwindowstruct**v_box=0;
| ^~~~~~~~~~~~~~~~~~~~~
| s_windowstruct
I use a structure and an interface.
The error occurs before run/debugger start.
Now I have to rebuild the whole source code to check when the error occurs.
Anyone already saw such an error?
I do compile with C-backend and 6.30 final version.
Source Code is longer, so no chance to give it here.
Thanks a lot for any idea!
"PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
Re: "PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
I had this in code
I changed it to:
The error is gone.
Error message was annoying for empty interface/endInterface block.
Code: Select all
interface IWindowStruct
;
endInterfaceCode: Select all
interface IWindowStruct
draw()
endInterfaceError message was annoying for empty interface/endInterface block.
Re: "PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
You must have mistyped them. A value is never assigned to an interface.
Code: Select all
Interface IWindowStruct
AddRef()
Release()
Draw()
EndInterface
Structure SWindowStruct
*vTable
Ref.i
EndStructure
Procedure AddRef(*this.SWindowStruct)
*this\Ref + 1
Debug "Ref: " + *this\Ref
ProcedureReturn *this\Ref
EndProcedure
Procedure Release(*this.SWindowStruct)
*this\Ref - 1
If *this\Ref < 1
Debug "Destroy Object"
FreeStructure(*this)
ProcedureReturn 0
Else
Debug "Ref: " + *this\Ref
ProcedureReturn *this\Ref
EndIf
EndProcedure
Procedure Draw(*this.SWindowStruct)
Debug "Draw"
EndProcedure
Procedure New()
Protected *object.SWindowStruct
*object = AllocateStructure(SWindowStruct)
If *object
*object\vTable = ?vt_IWindowStruct
*object\Ref = 1
EndIf
ProcedureReturn *object
EndProcedure
DataSection
vt_IWindowStruct:
Data.i @AddRef()
Data.i @Release()
Data.i @Draw()
EndDataSection
*obj.IWindowStruct = New()
If *obj
*obj\AddRef()
*obj\Draw()
*obj\Release()
*obj\Release()
EndIf
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
Re: "PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
I think empty structs are not supported in C, I will see how I can solve this
Re: "PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
Empty interfaces make sense ...
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
-
User_Russian
- Addict

- Posts: 1629
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: "PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
This code compiles without errors.Fred wrote: Fri Feb 06, 2026 9:51 am I think empty structs are not supported in C, I will see how I can solve this
Code: Select all
HeaderSection
typedef struct {} i_iwindowstruct;
static i_iwindowstruct**v_x=0;
EndHeaderSectionCode: Select all
Interface IWindowStruct
EndInterface
x.IWindowStruct"PureBasic - Assembler Error"; PB6.30; Win11; x64; C-Compiler backend
I know...
Not so important now that I know the error cause.
I switched back to dispatcher methods.


