View Single Post
  #8   Spotlight this post!  
Unread 27-11-2008, 15:09
MarkO's Avatar
MarkO MarkO is offline
Registered User
AKA: Mark D. Overholser
FRC #0957 (WATSON Robotics team)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Albany, Oregon, USA
Posts: 17
MarkO is an unknown quantity at this point
Re: Generic error in MPLAB

Quote:
Originally Posted by domoarigato View Post
Hey, all. Thanks in advance for the help!

So, I have been trying to install MPLAB on our team's new programming laptop. UNFORTUNATELY, (Having only the documentation that comes with the CD) I have hit problem after problem. Most of the problems were easy to fix, but It seems that I have hit an error that I cannot repair.

Well, Everything is installed. So, I decided that I would try and build some code that is known to be working. However, upon my attempt to build the code, I was prompted with the error message:


Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -D_FRC_BOARD -D_LARGE_CODE -D_DONT_USE_TMR0 -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\Documents and Settings\Administrator.LENOVOGHOST\Desktop\Code\wo rking\main.c:15:Error [1027] unable to locate 'ifi_aliases.h;
#include '
Halting build on first failure as requested.
BUILD FAILED: Tue Nov 25 09:07:58 2008


The file 'ifi_aliases.h' exists but it refuses to recognize it. Any help would be greatly appreciated.

First off, you path is too long and will cause issues with the Linker (IIRC).

Second, the PIC MCC18 compiler follows the ANSI C Standard fairly well. ANSI C, supports the Double Quote (e.g. " ) for bounding Include File Names that are in your Source Code directory, and the Less Than and Greater Than (e.g. < and > ) for bounding Include File Names that are in Compiler's Include Path.
That is why Include File Names like stdio.h and stdlib.h are Bounded with < and > and Include File Names like ifi_aliases.h and are Bounded with ".

Code:
/*******************************************************************************
* FILE NAME: ifi_utilities.c
*
* DESCRIPTION:
*  This file contains some useful functions that you can call in your program.
*
* USAGE:
*  The user should NOT modify this file, so that if a new version is released
*  by Innovation First then it can be easily replaced.
*  The user should add their own functions to either user_routines.c or another
*  custom file.
*
*******************************************************************************/

#include <usart.h>
#include <spi.h>
#include <adc.h>
#include <capture.h>
#include <timers.h>
#include <string.h>
#include <pwm.h>
#include "delays.h"       /*defined locally*/
#include "ifi_aliases.h"
#include "ifi_default.h"
#include "ifi_utilities.h"
#include "user_routines.h"


/*  Rest of file ifi_utilities.c, goes here  */
The MCC18 Compiler, might support the Single Quote (e.g. ' ) for bounding Include File Names, but that would be non ANSI Standard.

Also, move the Source Directory, "C:\Code\working\main.c" sounds like a good place to me.

When something is not compiling, look at other files that do compile and see how they are different than you code.

And also feel free to ask questions here....