Generate_Pwms argument error in MPLAB

I get the following error when I try to compile even the raw default code:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: “C:\Program Files\Microchip\mcc18\bin\mcc18.exe” -p=18F8722 “ifi_startup.c” -fo=“ifi_startup.o” -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: “C:\Program Files\Microchip\mcc18\bin\mcc18.exe” -p=18F8722 “ifi_utilities.c” -fo=“ifi_utilities.o” -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: “C:\Program Files\Microchip\mcc18\bin\mcc18.exe” -p=18F8722 “main.c” -fo=“main.o” -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: “C:\Program Files\Microchip\mcc18\bin\mcc18.exe” -p=18F8722 “user_routines.c” -fo=“user_routines.o” -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
G:\FRC\mplab project\user_routines.c:168:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:192:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:194:Error [1203] too few arguments in function call
G:\FRC\mplab project\user_routines.c:219:Warning [2066] type qualifier mismatch in assignment
G:\FRC\mplab project\user_routines.c:236:Warning [2066] type qualifier mismatch in assignment
Halting build on first failure as requested.
BUILD FAILED: Thu Feb 01 15:30:09 2007

It occurs here in User Routines.c, the first call to Generate_Pwms():

void Process_Data_From_Master_uP(void)
{
  static unsigned char i;

  Getdata(&rxdata);   /* Get fresh data from the master microprocessor. */

  //Default_Routine();  /* Optional.  See below. */
  My_Routine();

  /* Add your own code here. (a printf will not be displayed when connected to the breaker panel unless a Y cable is used) */

  printf("Port1 Y %3d, X %3d, Fire %d, Top %d\r",pwm01,pwm05,p1_sw_trig,p1_sw_top);  /* printf EXAMPLE */

  Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

  /* Example code to check if a breaker was ever tripped. */

  if (aBreakerWasTripped)
  {
    for (i=1;i<29;i++)
    {
      if (Breaker_Tripped(i))
        User_Byte1 = i;  /* Update the last breaker tripped on User_Byte1 (to demonstrate the use of a user byte) 
                            Normally, you do something else if a breaker got tripped (ex: limit a PWM output)     */
    }
  }

  Putdata(&txdata);             /* DO NOT CHANGE! */
}

The declaration is here, in ifi_utilities.h:

void Hex_output(unsigned char temp);  /* located in ifi_library.lib */

#ifdef _FRC_BOARD
  /* located in ifi_library.lib */
void Generate_Pwms(unsigned char pwm_13,unsigned char pwm_14,
                   unsigned char pwm_15,unsigned char pwm_16);
#else
  /* located in ifi_library.lib */
void Generate_Pwms(unsigned char pwm_1,unsigned char pwm_2,
                   unsigned char pwm_3,unsigned char pwm_4,
                   unsigned char pwm_5,unsigned char pwm_6,
                   unsigned char pwm_7,unsigned char pwm_8);
#endif

I’m assuming that _FRC_BOARD wasn’t defined, and the 8-argument version of Generate_Pwms() was declared instead of the 4-argument version. The first call the Generate_Pwms() is above, and it’s clearly meant for the first declaration. The only other call is in user_routines_fast.c and it’s the same line. I haven’t found any ifi_library.lib anywhere.

I remember this same error from before and I got it compiled, but now I can’t remember what I did or what was wrong. :’(

Also, what is done to pwms 13-16 that isn’t done to the others? Other than the cpp functionality. And another error, although it might go away when the first one does, but it says

Error - processor types do not agree across all input files.

while/after it hits the linker stage.
This is what happens when I commented out the Generate_Pwms in user_routines.c and user_routines_fast.c.

Just a thought: have you tried rebuilding all? (the button next to “Make”).

You probably have some old object (.o) files lying around. I think there’s a batch file that will clean it up too.

I’ve rebuilt it many times, used the batch file, and completely replaced the code and rebuilt with no object files.

Make sure that the compiler is passed the -D_FRC_BOARD and -D_LARGE_CODE options, to define the corresponding macros. I’m not sure how to do that in MPLAB, it should be in some configuration menu.

The error you are getting has nothing to do with IFI_Library.lib, which is only added statically at link time (not compile time).

The “raw, default code” will compile and link with no problems.

I would suggest that you uninstall and then re-install MPLAB and the C18 compiler.

haha this is a little late, but yeah, I just had to add those macro definitions. In MPLAB, go to Project>Build options>Project and add _FRC_BOARD and _LARGE_CODE under the c18 tab.