View Single Post
  #2   Spotlight this post!  
Unread 26-06-2005, 01:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: printf could not find definition

Printf’s are worth getting running. Pardon me since I'm sure you’ve already tried these things. Some of my questions are just to reconfirm where you’re at. Also, stating the obvious might help anyone with the same problem who finds this thread through a future search.

I assume you added the call to printf in user_routines.c?

Do you have the following line defined in user_routines.c?
#include "printf_lib.h" //(only used with pre-v2.4 compilers)
or did you use
#include <stdio.h>

Do you have the include path (C:\mcc18\h) and library path (c:\mcc18\lib) specified under Project _> Build Options… -> Project

In your MPLAB project window is “printf_lib.c” or “printf_lib.h” listed (only used with pre-v2.4 compilers)?

Do you know which version of the C compiler you are running?
(Look at the first line in C:\mcc18\README.C18)

On the machine you are using did you ever install from the original CD shipped with the KOP or EDU kit? That'll beg the question: Did you uninstall all old versions of the C18 compiler before installing v2.4?

To expand on your quote from the other thread...
One of the possible causes of the problem you have occurs when you install the v2.4 C compiler on a PC that already has an older version of the compiler. The compiler is told various places and in a variety of ways where to find the files and libraries to use when compiling a project. Old and new files can get mixed. The programmer in the other post solved his or her problem by uninstalling the C18 compiler and making sure all the files were indeed gone, then installing v2.4 from scratch.

If by chance you are using an older version of the compiler, then the solution is a little different.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 26-06-2005 at 01:58.