Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help !!! (http://www.chiefdelphi.com/forums/showthread.php?t=63157)

sonnguyen 02-02-2008 22:24

Help !!!
 
Hi,

When I compile today, I get this problem

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\ifi_frc_simple_30\ifi_frc.h:31:Error [1027] unable to locate 'p18cxxx.h'
C:\ifi_frc_simple_30\serial_ports.h:48:Error [1027] unable to locate 'stdio.h'
MPLAB C18 v3.15 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 60
Halting build on first failure as requested.

How can I solve it ? I am using MPLAB v8.00

zkaratekid 02-02-2008 22:28

Re: Help !!!
 
hey our programmer said that you need to reinstall the upgrade for mplab 8 and make sure you have compiler v. 3

tdlrali 02-02-2008 22:30

Re: Help !!!
 
gotta fix your project's search paths.
find the project settings in the project menu, and change the paths.
include -> mcc18/h
library -> mcc18/lib
linker -> mcc18/lkr

sonnguyen 02-02-2008 22:50

Re: Help !!!
 
Quote:

Originally Posted by tdlrali (Post 691066)
gotta fix your project's search paths.
find the project settings in the project menu, and change the paths.
include -> mcc18/h
library -> mcc18/lib
linker -> mcc18/lkr

Can you say more detail ?

I have the v.3 compiler

tdlrali 02-02-2008 22:54

Re: Help !!!
 
Open MPLab, open the project, go to Project -> Build Options -> Project
Then on the General tab (or something like Paths in v8), set the links like this:
Linker -> mcc18/lkr
Library -> mcc18/lib
Include -> mcc18/h

where mcc18 is the path to your c18 installation

sonnguyen 02-02-2008 23:01

Re: Help !!!
 
It seems that there is no such tab like you said

tdlrali 02-02-2008 23:13

Re: Help !!!
 
Well, look around and use common sense, there is one with paths, i know that for sure.

sonnguyen 02-02-2008 23:16

Re: Help !!!
 
I have done like you said. Now there is another problem


Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F8722 /i"C:\MCC18\h" "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.15 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 60
C:\ifi_frc_simple_30\autonomous.c:242:Error: syntax error
Halting build on first failure as requested.

tdlrali 02-02-2008 23:21

Re: Help !!!
 
Well, check line 242 in the autonomous.c file, there's a syntax error on that line.

sonnguyen 02-02-2008 23:23

Re: Help !!!
 
void Autonomous_Spin(void)

This is the line. Is there any error ?

Chaos in a Can 02-02-2008 23:32

Re: Help !!!
 
Check the lines above that for something like a missing brace or semicolon.

Since the C18 compiler gives ever-so-helpful error messages, I can't say for sure, but I'm guessing the compiler was expecting a semicolon at the end of a statement or a closing curly-brace, but instead it found "void Autonomous_Spin(void)".

The syntax error occurred on line 242, but the problem that caused it isn't necessarily on that line. The actual problem is often on the line above the one the compiler says it is.

tdlrali 02-02-2008 23:33

Re: Help !!!
 
Without the surrounding code, it's hard to tell. Based on that file name, I'm assuming you're using Kevin's v3 code, correct? Did you modify that file?

sonnguyen 02-02-2008 23:35

Re: Help !!!
 
yeah i did modify the file.

I don't have any code surronding that one

It said it's version is v.0.1

tdlrali 02-02-2008 23:41

Re: Help !!!
 
Well, without the whole file, it's hard to tell what's wrong, but do you have semicolons and closing brackets everywhere? (Those would result in something more like "expected xx instead of yy" errors, though...)

Chaos in a Can 02-02-2008 23:44

Re: Help !!!
 
Check the last few lines that have code on them that are before where you get the error.

Better yet, show those lines.

I'm pretty sure C18 doesn't give "expected ..." errors for missing/extra semicolons and braces.
It just says "syntax error".

The only time it seems to give and "expected" error is when you use . instead of -> or the other way around.


All times are GMT -5. The time now is 01:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi