Jump to content

MikeFette

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by MikeFette

  1. This feature may be in a write-up elsewhere, but I found this problem the hard way. If you reference a file name for an image file that only contains numbers such as "054.bmp" you will have trouble. When you point to this type of a file name and then go to the preview generator, I would see an error as follows:

    --------------------

    Compiling gui.c

     

    gui.c:45:12: error: expected identifier or '(' before numeric constant

    --------------------

     

    On that line of code in gui.c the image file name was generated as:

     

    gdispImage 054;

     

    This is obviously a declaration of an image file structure, but you can't have a structure name in code that is only a number and therefore the problem. The code generator strips off the file name (without the .bmp or gif) and uses it directly in the code. You need to use some sort of alpha based file naming convention so that it can properly translate into a structure name such as "Button054.bmp" which will change the declaration to the following:

     

    gdispImage Button054;

     

    I also found that if you use the numeric value first such as "054Button.bmp" that will fail also. I think you need to always start your image file names with a character.

     

    After changing all my image file names to properly titled values that translate to proper structure names, the translator was able to handle this properly and the problems went away.

×
×
  • Create New...