Page 1 of 1

undefined symbol 'SM_3057'.

Posted: Sat Jun 14, 2025 6:11 pm
by Cyllceaux
I know the strRecord should be before strSchema but the intersting thing is, if I change the order *schema.strSchema still workes

Code: Select all

Structure strVTable
	*vtable
EndStructure

Structure strSchema Extends strVTable
	name.s
	Map types.i()
	List *records.strRecord()
EndStructure

Structure strRecord Extends strVTable
	Map *entries()
	*schema.strSchema
EndStructure
Image
Image

// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)

Re: undefined symbol 'SM_3057'.

Posted: Sat Jun 14, 2025 6:21 pm
by mk-soft
Change order of structures ...

Code: Select all

Structure strVTable
	*vtable
EndStructure

Structure strRecord Extends strVTable
  Map *entries()
	*schema.strSchema
EndStructure

Structure strSchema Extends strVTable
	name.s
	Map types.i()
	List *records.strRecord()
EndStructure
Before using a structure in a structure, it should first be defined

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 10:18 am
by HeX0R
but shouldn't we expect a useful error message than at least?

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 10:38 am
by Fred
This one should work

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 11:15 am
by Cyllceaux
Fred wrote: Sun Jun 15, 2025 10:38 am This one should work
What should work? The code or the useful error message?

For me it is not a problem but both would be nice :)

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 11:21 am
by PBJim
Cyllceaux wrote: Sun Jun 15, 2025 11:15 am What should work? The code or the useful error message?
It confused me also :D

I think possibly the problem here is that the PB compiler doesn't always validate a structure used in a pointer element, so therefore when it doesn't validate, it gets passed to the C compiler, or assembler.

For instance, this undefined structure compiles without any errors.

Code: Select all

Structure strVTable
	*vtable.mystructure
EndStructure

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 11:57 am
by jacdelad
mk-soft wrote: Sat Jun 14, 2025 6:21 pm Change order of structures ...

Code: Select all

Structure strVTable
	*vtable
EndStructure

Structure strRecord Extends strVTable
  Map *entries()
	*schema.strSchema
EndStructure

Structure strSchema Extends strVTable
	name.s
	Map types.i()
	List *records.strRecord()
EndStructure
Before using a structure in a structure, it should first be defined
strRecord uses strSchema and strSchema uses strRecord. Shouldn't this be illegal in any order?

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 12:13 pm
by NicTheQuick
jacdelad wrote: Sun Jun 15, 2025 11:57 am
mk-soft wrote: Sat Jun 14, 2025 6:21 pm Change order of structures ...

Code: Select all

Structure strVTable
	*vtable
EndStructure

Structure strRecord Extends strVTable
  Map *entries()
	*schema.strSchema
EndStructure

Structure strSchema Extends strVTable
	name.s
	Map types.i()
	List *records.strRecord()
EndStructure
Before using a structure in a structure, it should first be defined
strRecord uses strSchema and strSchema uses strRecord. Shouldn't this be illegal in any order?
Not with pointers.

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 2:02 pm
by Fred
It shouldn 't have any error, your code is supported. That's why it compiles but the asm is wrong somehow.

Re: undefined symbol 'SM_3057'.

Posted: Sun Jun 15, 2025 9:16 pm
by jacdelad
NicTheQuick wrote: Sun Jun 15, 2025 12:13 pm
jacdelad wrote: Sun Jun 15, 2025 11:57 am
mk-soft wrote: Sat Jun 14, 2025 6:21 pm Change order of structures ...

Code: Select all

Structure strVTable
	*vtable
EndStructure

Structure strRecord Extends strVTable
  Map *entries()
	*schema.strSchema
EndStructure

Structure strSchema Extends strVTable
	name.s
	Map types.i()
	List *records.strRecord()
EndStructure
Before using a structure in a structure, it should first be defined
strRecord uses strSchema and strSchema uses strRecord. Shouldn't this be illegal in any order?
Not with pointers.
Ah yes, my fault.

Re: undefined symbol 'SM_3057'.

Posted: Thu Jun 19, 2025 9:36 am
by Cyllceaux
just for me... is it a bug or not?
I created that thread in "Codingquestion".
Someone moved it to the bug section and @kiffi moved it back zu "Codingquestion".

Now I'm confused

Re: undefined symbol 'SM_3057'.

Posted: Thu Jun 19, 2025 10:20 am
by Fred
it's a bug