View Single Post
  #1   Spotlight this post!  
Unread 03-02-2008, 00:01
Kilroy0846 Kilroy0846 is offline
Registered User
FRC #2139
 
Join Date: Jan 2007
Location: Las Vegas
Posts: 28
Kilroy0846 is an unknown quantity at this point
Calling functions from other documents

In MPLAB, how do I call functions from other files in a project?

Here is my code:
Code:
static int counter;

counter = Get_Encoder_3_Count();
And the Get_Encoder_3_Count() function is located in the file encoder.c

Here is the function code:
Code:
long Get_Encoder_3_Count(void)
{
	long count;

	INTCONbits.RBIE = 0;

	count = Encoder_3_Count;
	
	INTCONbits.RBIE = 1;

	return(count);
}
The error that I get is:

Error - could not find definition of symbol 'Get_Encoder_3_Count' in file 'V:\frc-code-2007-8722\FrcCode_2007_8722\user_routines.o'.

Last edited by Kilroy0846 : 03-02-2008 at 00:03. Reason: Added The Error Text