PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: not compiling  (Read 458 times)

raymw

  • FireFly3 User
  • Senior Member
  • *
  • Posts: 219
not compiling
« on: May 28, 2018, 06:32:43 PM »

Using firefly, I thought I would programatically change the background colour of a button, using FF_Control_setcolor. Then couldn't quickly find the colour values I needed, so I deleted the command from my form. Now, nothing will compile, neither the program I was working on or any others that were OK before. Attached listing of compiler log, which is more or less the same, afaik, for all my programs.
Code: [Select]
FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win32 (32bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target:       win32, 486, 32bit
compiling:    CODEGEN_GRIDDRILL_MAIN.bas -o CODEGEN_GRIDDRILL_MAIN.asm (main module)
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(162) error 41: Variable not declared, col in 'col Sub FF_Control_SetColor( ByVal hWndControl as HWnd, _'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(170) error 41: Variable not declared, hWndControl in 'If IsWindow(hWndControl) Then'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(172) error 1: Argument count mismatch, found 'hWndControl' in 'ff_control = GetProp(hWndControl, "FLY_PTR")'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(182) error 41: Variable not declared, BackColor in 'If BackColor <> -1 Then'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(182) error 3: Expected End-of-Line, found 'BackColor' in 'If BackColor <> -1 Then'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(186) error 1: Argument count mismatch, found 'BackColor' in 'ff_control->hBackBrush = CreateSolidBrush(BackColor)'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(187) error 9: Expected expression, found 'BackColor' in 'ff_control->nBackColor = BackColor'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(189) error 1: Argument count mismatch, found 'hWndControl' in 'SetClassLongPtr hWndControl, GCLP_HBRBACKGROUND, Cast(Integer, CreateSolidBrush(BackColor))'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(196) error 41: Variable not declared, ForeColor in 'If ForeColor <> -1 Then'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(196) error 3: Expected End-of-Line, found 'ForeColor' in 'If ForeColor <> -1 Then'
C:\Users\Ray\firefly\Projects\griddrill\release\CODEGEN_GRIDDRILL_UTILITY.inc(196) error 132: Too many errors, exiting


Looks like I may need to reinstall firefly. I've got backups from yesterday anyway, but what has got corrupted?

Best wishes,

Ray
Logged

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8635
  • Windows 10
    • PlanetSquires Software
Re: not compiling
« Reply #1 on: May 28, 2018, 06:54:17 PM »

It kind of looks like FireFly may have failed parsing the code to output the CODEGEN files when FF_Control_SetColor (btw, that command doesn't work on command buttons - that's a Windows limitation).

Maybe try removing FF_Control_SetColor from your code and then delete all of the CODEGEN*.* files. Finally, do a re-compile.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Senior Member
  • *
  • Posts: 219
Re: not compiling
« Reply #2 on: May 28, 2018, 09:41:32 PM »

Hi Paul, thanks for reply, but it did not solve the problem. I'm thinking firefly itself has got corrupted, or an inc. file been messed up.

Even just making a new project with a simple plain form gives similar compile error.

I had a look in my firefly folder, the only files with a recent time were the .ini and .ini.bak files. I checked them with yesterday's backup and they looked the same, I restored all of the firefly folder from yesterday's backup, and it is now working again, other than a couple of today's recent additions, of course. I don't know what caused it, I don't feel like trying to cause it again....
« Last Edit: May 28, 2018, 10:17:37 PM by raymw »
Logged