Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBGFX not compiling
#1
Hello, I am trying to compile one of the sample programs included in the library but it does not compile. Here is the error:

Code:
C:\FREEBA~1>fbc primitivesTest32.bas -s gui -i .\ QB_gfx_main.o QB_gfx_text.o QB_gfx_pal.o -l sdl

gfxmain.bi(87) : Error 25: Expected identifier, found: 'screen'

Yes, I included qbgfx4fb.bi and sdl.bi in the program. And line 87 in gfxmain.bi is:

Code:
declare function screen stdcall alias "fb_GfxScreen" (ScreenNum as integer) as integer

Why won't it compile?
Reply
#2
Because FreeBASIC now has that library built in. There's no need to include qbgfx4fb.bi anymore, you can now use screen, pset, etc just like in QB.

Example
Code:
screen 256, 256, 32

for red = 0 to 255
   for green = 0 to 255
      pset (red, green), rgb(red, green, 255 - red)
   next green
next red

flip
do: sleep 50: loop until len(inkey$)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)