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

Linux specific forum
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

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

Post 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
Last edited by Janni on Wed Jul 13, 2022 7:14 am, edited 1 time in total.
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Structure not found: Point. - on Linux

Post 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
The Stone Age did not end due to a shortage of stones !
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: Structure not found: Point. - on Linux

Post 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
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
User avatar
mk-soft
Always Here
Always Here
Posts: 5393
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

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

Post by mk-soft »

Linux gdk ...

Code: Select all

p.gdkpoint

p\x = 10
p\y = 20
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
Post Reply