Compiler Error

Started by Martin Francom, November 02, 2009, 09:26:07 PM

Previous topic - Next topic

Martin Francom

Paul,
   Got a compiler error.  Appearantly related to Jose's Includes

Am I using an outdated version of the includes?

I tryed recompiling via PBedit  and got the error message. When compiled from FF3 got a different message:   
Error 468   Duplicate Equate    %FILE_READ_ONLY = 4002

See screen print attached:

Martin Francom

Also, to get the screen print to attach I had to reduce it's size and color.  A 128k is the max this board will accept.  Isn't that a bit small?

Paul Squires

Hi Marty,

Not sure. I can not test it tonight. You could try getting the latest includes from:
http://www.jose.it-berater.org/smfforum/index.php?topic=3189.0

Did you manually #Include that file into your project? FireFly automatically includes the correct Jose files based on what controls are present in your project. If you also #Include the file then maybe that's what is triggering the duplicate definition? Not sure at this point.

Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Martin Francom on November 02, 2009, 09:35:26 PM
Also, to get the screen print to attach I had to reduce it's size and color.  A 128k is the max this board will accept.  Isn't that a bit small?

Right you are - I increased the attachment size to 1 meg each.
Paul Squires
PlanetSquires Software

Martin Francom

Paul,
   I just downloaded and install the latest files from Jose's web site.  Still the same problem.  The program will install using PB WinAPI but not with Jose's.
   Just now tried with a couple other programs and got the same problem.

Paul Squires

So, even with the other programs that you compiled is the error always DUPLICATE DEFINITION on the Edit_CanUndo statement?

I will run some tests tomorrow when I am back at my development computer.
Paul Squires
PlanetSquires Software

José Roca

Quote
I tryed recompiling via PBedit  and got the error message. When compiled from FF3 got a different message:   

If you use the PB IDE, that by default uses the PB include files unless you change the path, it is normal that you will get duplicate errors because you can't mix PB include files with mine.

Quote
Error 468   Duplicate Equate    %FILE_READ_ONLY = 4002

This is the real error. From where comes this equate? %FILE_READ_ONLY is a constant used by the FileEncryptionStatus function and has a value of 8, as correctly defined in WinBase.inc of my include files.


Martin Francom

Jose,
    I think there is a conflict between Cheetah's INC's and your INC's.   I have asked Paul to verify that conclusion.
    This problem seems only to happen when Cheetah's INC's are part of the project.  Also, the project will compile if I use PBwin INC's instead of your INC's


José Roca

Quote
This problem seems only to happen when Cheetah's INC's are part of the project.

I don't have that include file. It must have the conflicting equate. For own equates and procedures it is always advisable to use a prefix.

Quote
Also, the project will compile if I use PBwin INC's instead of your INC's

Only because these includes are outdated and don't include the %FILE_READ_ONLY equate.

Paul Squires

The equate is defined in the Cheetah2.inc include file as follows:

     %FILE_READ_ONLY = 4003 

Try changing the Cheetah2.inc file to use the same value as the Window's equate:

     %FILE_READ_ONLY = 8

That should work. It doesn't matter to Cheetah if the value is 8 or 4003. In the context that %FILE_READ_ONLY is used within Cheetah, it should not pose any problems.

Paul Squires
PlanetSquires Software

Martin Francom

#10
Paul,
   Making that one change seemed to fix the compile problem. But I am wondering if any of the other equates need to be changed.  I searched through Jose' INCs and only found the one that conflicts.   

   Should any of these also need to be changed?

     %FILE_ACCESS_ERROR = 4000
     %INVALID_DATE_FORMAT = 4001     
     %FILE_READ_ONLY = 4002           
     %FILE_WRITE_ONLY = 4003         
     %INVALID_FILENAME = 4004         
     %ENGINE_NOT_INITIALIZED = 5000   
     %FILE_NOT_FOUND = 5001           
     %TOO_MANY_FILES_OPEN = 5002     
     %INVALID_STRUCTURE = 5003       
     %FILE_NOT_OPEN = 5004             

Paul Squires

Hi Marty,

I did a search of all of Jose's includes and the only one from that list is  %FILE_READ_ONLY. The others should be okay.

Paul Squires
PlanetSquires Software

Martin Francom

Paul,
  Thank you for checking. 
If I understand correctly that equate is just used as an error code so as long as we are not testing for the numeric value, we shouldn't have a problem.
 

Paul Squires

Paul Squires
PlanetSquires Software