Page 1 of 1

[Done] How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 6:19 am
by Cyllceaux
I receive this error. Is there a compiler-log to check?

I receive this with the ASM Backend and the C-Backend.

Code: Select all

I don't know why, but my

--------------------------------------------------------------------------------
  Erstellen von 'Standard-Ziel'...
--------------------------------------------------------------------------------
Einlesen: SmallDB.pbi
Einlesen: ..\macros.pb
Einlesen: macros.pb
Einlesen: strukturen.pb
Einlesen: declare.pb
Einlesen: global.pb
Der Compiler scheint abgestürzt oder unerwartet beendet worden zu sein. 
Abbruch der Kompilierung...

--------------------------------------------------------------------------------

  1 Ziele mit Fehlern kompiliert.
  Die Erstellungs-Sequenz wurde abgebrochen.

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 8:14 am
by Bisonte
Mostly a Anti-Virus problem...
Try it out if you "stop" your scanner while compiling...

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 4:53 pm
by Cyllceaux
Hi Bisonate... without my AV its the same result. :(

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 5:09 pm
by Cyllceaux
HA!!!! I can reproduce it!!!

you need 4 files:
str.pb

Code: Select all

Structure str1
	feld.i
EndStructure

Structure str2
	feld.i
EndStructure
dec.pb

Code: Select all

Declare test1(*t1.str1,*t2.str2)
Declare test2(*t1.str1,*t2.str3)
glob.pb

Code: Select all

Procedure test1(*t1.str1,*t2.str2)
	Debug "OK"
EndProcedure

Procedure test2(*t1.str1,*t2.str3)
	Debug "NOK"
EndProcedure
main.pb

Code: Select all

EnableExplicit


XIncludeFile "str.pb"
XIncludeFile "dec.pb"
XIncludeFile "glob.pb"

test1(0,0)
test2(0,0)

The Problem is declare und procedure test2. They use a non-existing structure.
This breakes the compiler.

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 5:11 pm
by Fred
It should not, I will take a closer look

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 5:41 pm
by Axolotl
Yepp. You don't need separate files.
with 6.30 b2 on Win11 the message box is also displayed.
Not saved, <New.> only

Code: Select all

EnableExplicit

; XIncludeFile "str.pb"
Structure str1
	feld.i
EndStructure

Structure str2
	feld.i
EndStructure

; XIncludeFile "dec.pb"
Declare test1(*t1.str1,*t2.str2)
Declare test2(*t1.str1,*t2.str3)

; XIncludeFile "glob.pb"
Procedure test1(*t1.str1,*t2.str2)
	Debug "OK"
EndProcedure

Procedure test2(*t1.str1,*t2.str3)
	Debug "NOK"
EndProcedure


test1(0,0)
test2(0,0)

Re: How to find the reason for compiler-problems?

Posted: Thu Nov 06, 2025 7:00 pm
by mk-soft
Only on Window crashed

On macOS and Linux the message "Line 14: Structure not found: str3."

Re: How to find the reason for compiler-problems?

Posted: Fri Nov 07, 2025 1:13 pm
by User_Russian
One line is needed for the crash compiler.

Code: Select all

Declare test2(*t1.point, *t2.struct)

Re: How to find the reason for compiler-problems?

Posted: Fri Nov 07, 2025 1:15 pm
by BarryG
User_Russian wrote: Fri Nov 07, 2025 1:13 pm One line is needed for the crash compiler.

Code: Select all

Declare test2(*t1.point, *t2.struct)
On PB 6.10, that one line doesn't crash the compiler but just gives this error:

Code: Select all

---------------------------
PureBasic
---------------------------
Line 1: Structure not found: str3.
---------------------------
OK   
---------------------------

Re: How to find the reason for compiler-problems?

Posted: Fri Nov 07, 2025 1:18 pm
by User_Russian
BarryG, tested in PB 6.30 b4.

Re: How to find the reason for compiler-problems?

Posted: Sat Nov 08, 2025 1:24 am
by BarryG
Yep, just pointing out that the crash is a regression bug, because it doesn't happen with 6.10. ;)

Re: How to find the reason for compiler-problems?

Posted: Sat Nov 08, 2025 11:13 pm
by Fred
Fixed.