![]() |
Compile failure
Hi, I'm a new programmer when it comes to FRC (I programed for FVC last year, and have some level of programming background), and I'm having trouble getting some code to compile.
The assembler works fine, but when MPLINK starts up, it fails, giving an error message of: Code:
Error - could not find definition of symbol 'STATUS' in file 'J:\*\user_routines_fast.o |
Re: Compile failure
1. What does project->build options->project show under the General tab for include path? It should point to mcc18\h subdirectory where the pic*.h files are located. That is where STATUS is defined.
2. What does edit->find in files with find what equal to STATUS show. Note ifi_routines_fast.c includes user_routines.h so a change there may have effected the build. The file ifi_default.h should include p18cxxx.h which will include the correct header file for the processor (p18f8722.h) if the project configuration is set correctly. The 'STATUS' name is defined in the p18*.h file. |
Re: Compile failure
The include path was wrong, and I fixed it, but the error is still occuring. Plus, I can't find STATUS anywhere, just some references to statusflag and Device Status.
I also don't recognize some of the files you're talking about. In my program directory I have: ifi_startup.c ifi_utilities.c main.c user_routines.c user_routines_fast.c user_SerialDrv.c delays.h ifi_aliases.h ifi_default.h ifi_utilities.h user_routines.h user_SerialDrv.h the library file (722 one), and the linker file (same). Am I missing something? EDIT: I downloaded Keven's code and got the same thing in ifi_code.o. If it makes a difference, I'm running MPLAB 8.0 and C18 3.10 |
Re: Compile failure
There might be some residual file references left in the project definition from when the directory paths were messed up. Try doing a full Build of the project instead of a Make (or just do a Clean first).
dcbrown is correct to point out that editing user_routines.h will affect user_routines_fast.c (because it's #included). What changes did you make? It's possible that something at the very end of the .h file is causing the compiler to misinterpret something at the beginning of the .c file. |
Re: Compile failure
Doing a Build All doesn't change anything; the error still appears.
All I added was the following after the #defines for OPEN and CLOSE. They're all used in user_routines.c: Code:
#define PI 3.14159265 // Defines pi for use in converting radians to degrees & vice versaAlso, note the edit in my last post. |
Re: Compile failure
Quote:
|
Re: Compile failure
Sorry, I should have been clearer. That's only the machine I'm on right now. I get the same thing on another machine I have running whatever C18 was on the CD. Both are running MPLAB 8.0, though.
|
Re: Compile failure
Without the full project, we're making guesses based upon previous experience.
One way of trying to fix this is to add the following line to user_routines_fast.c before any other #include directives. Code:
#include "p18f8722.h"PIC18F8722 Then do: Project->Clean Project->Build all Report any errors. Are there no warnings or messages in the output before this? What is the specific error line, "'J:\*\" should be "J:\<dir1>...\" MPLAB is path length sensitive..., what is the exact error message output. I added the defines to my project and it compiled/linked ok so it is something else either within the source files or within the build environment. |
Re: Compile failure
Okay, I uninstalled and reinstalled everything and copied my code over into a new project, and now things are working. Seems like I probably screwed something up while playing around with settings, possibly twice. Thanks anyway.
|
| All times are GMT -5. The time now is 23:54. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi