Troubleshooting compiler errors - any advice?

Started by Philip Storry, June 02, 2015, 02:52:21 PM

Previous topic - Next topic

Philip Storry

I've got a new(ish) project with FireFly that suddenly started generating a compile error.

Some background: This is an attempt to create a GUI version of a CLI program I wrote years ago. As such, there is almost no actual code in the project yet. I've just been putting buttons & labels down onto a window to get the look and feel correct, and have only just started to move onto putting any actual logic behind the controls. So far, a button will bring up a File Open dialogue box, and a label or two will be precomputed once the file is selected - nothing more.

Earlier today I was just editing some of the code around precomputing the labels, and I've started getting the following error when compiling:
---------------------------
Compile Error
---------------------------
The Compiler returned an error during compiling:

Error 516:  DEFTYPE, TYPE ID (?%&!#$), OR AS... REQUIRED: VCARDS
---------------------------
OK   
---------------------------


I can't see why this is. Annoyingly, that's the whole error message - no filename or line number is given.

In order to troubleshoot this I've tried the following:

  • Searched for the whole word "VCARDS" across my whole project - no hits that weren't part of a comment or text string. None of them seemed problematic to me.
  • Commented out all of my code. All the subs, functions and the one prototype class I'd written are now commented out, and all (both!) calls to them from controls are commented. That didn't fix it.
  • Removed all empty <control>_CLICKED functions, in case I'd accidentally hit the keyboard and turned one into gibberish.
  • Added back in all the removed functions from above by double-clicking on every control in the form. (Which didn't fix it, so I removed them again to make things clearer to read.)
  • Turned on the keeping of generated files in the project and gone through them looking for functions without an AS qualifier or odd-looking TYPE blocks.
  • Tried running "find.exe VCARDS *.bas/*.inc" to see if there was anything I'd missed. (This was less successful than I'd like due to multiline function declarations!)
  • Checked all the paths in both Tools -> Environment Options and in the Project Properties are OK.
  • Tried to compile the generated code myself, but failed as I wasn't sure what order to put my paths in.

I'm still at a loss as to why this compiler error is occurring. I'm also fairly open to the idea that I've probably inadvertently done something stupid! Sadly, I just don't know enough about the FireFly build process to get much further in my troubleshooting, so any hints and tips folks have are welcome.

I've attached the project to this message, in case it helps.

The environment is a plain Windows 7 virtual machine, and FF has compiled this project correctly before today (although I .

Thanks in advance for any help!

Wilko Verweij

Hi,
I opened the generated source code in PB editor. The problem is in the line:
    FLY_String = "You can let vCardSplit create an output folder automatically, or select one yourself. The automatic folder will be called "SPLIT vCards"."

Note the quote before 'SPLIT'. It is interpreted as the closing quote ("You (..) called "). The words SPLIT and VCARDS are interpreted as keywords which, in case of vCARDS, gives the erroro. Is it the text of a label or so? THen replace double quotes around  'SPLIT Vcards' with single ones and hte problem is solved.

Good luck
Wilko

Philip Storry

D'OH!

That makes perfect sense - thanks Wilko.

I had a feeling it would be something silly I'd done. I can't believe I didn't spot that I'd used double-quotes there!

Opening the files in the PB Editor is a good tip - I'll bear it in mind in future! I've amended that tooltip, and the compiler error has gone now.

Thanks again for being the second pair of eyes that I needed on this occasion.  :)