Page 1 of 1

Structure not found: Point. - on Linux (Solved)

Posted: Tue Jul 12, 2022 11:23 pm
by Janni
Hi,

I'm trying to follow the brilliant Snake example from the Pure Programming Youtube channel to learn some basics.

When running the code in Windows it works fine, but trying to compile in Linux it throws a error:
[00:13:42] [COMPILER] Line 32: Structure not found: Point.

Line 32 is:

Code: Select all

Global Dim snake.Point(0)
Any ideas ?

Link to the code:
https://pastebin.com/h4jHwbg6

Re: Structure not found: Point. - on Linux

Posted: Wed Jul 13, 2022 1:27 am
by StarBootics
Hello,

The point structure came from the Window API and don't exist under Linux. To make the code to work under Linux you have to define it like that :

Code: Select all

CompilerIf Not Defined(Point, #PB_Structure)
  
  Structure Point
    
    x.l
    y.l
  
  EndStructure
  
CompilerEndIf
Best regards
StatBootics

Re: Structure not found: Point. - on Linux

Posted: Wed Jul 13, 2022 7:13 am
by Janni
StarBootics wrote: Wed Jul 13, 2022 1:27 am Hello,

The point structure came from the Window API and don't exist under Linux. To make the code to work under Linux you have to define it like that :

Code: Select all

CompilerIf Not Defined(Point, #PB_Structure)
  
  Structure Point
    
    x.l
    y.l
  
  EndStructure
  
CompilerEndIf
Best regards
StatBootics
Yup that works! Thanks for the explanation and the solution StatBootics :D

Re: Structure not found: Point. - on Linux (Solved)

Posted: Wed Jul 13, 2022 10:22 pm
by mk-soft
Linux gdk ...

Code: Select all

p.gdkpoint

p\x = 10
p\y = 20