undefined symbol 'SM_3057'.

Post bugreports for the Windows version here
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

undefined symbol 'SM_3057'.

Post 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)
User avatar
mk-soft
Always Here
Always Here
Posts: 6236
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: undefined symbol 'SM_3057'.

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
HeX0R
Addict
Addict
Posts: 1198
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: undefined symbol 'SM_3057'.

Post by HeX0R »

but shouldn't we expect a useful error message than at least?
Fred
Administrator
Administrator
Posts: 18171
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: undefined symbol 'SM_3057'.

Post by Fred »

This one should work
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: undefined symbol 'SM_3057'.

Post 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 :)
PBJim
Enthusiast
Enthusiast
Posts: 296
Joined: Fri Jan 19, 2024 11:56 pm

Re: undefined symbol 'SM_3057'.

Post 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
User avatar
jacdelad
Addict
Addict
Posts: 2001
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: undefined symbol 'SM_3057'.

Post 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?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
NicTheQuick
Addict
Addict
Posts: 1514
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: undefined symbol 'SM_3057'.

Post 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.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Fred
Administrator
Administrator
Posts: 18171
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: undefined symbol 'SM_3057'.

Post by Fred »

It shouldn 't have any error, your code is supported. That's why it compiles but the asm is wrong somehow.
User avatar
jacdelad
Addict
Addict
Posts: 2001
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: undefined symbol 'SM_3057'.

Post 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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: undefined symbol 'SM_3057'.

Post 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
Fred
Administrator
Administrator
Posts: 18171
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: undefined symbol 'SM_3057'.

Post by Fred »

it's a bug
Post Reply