Go to Post Every now and then, the judicious application of a modicum of common sense can make all the difference in the world. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2005, 19:40
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
WEIRD compiler error

I have a project that compiles just fine with older C18 versions, but
when i try to compile it under 2.4 i get the following errors:
C:\mcc18\h\p18f8520.h:169:Error [1109] type mismatch in redeclaration of 'PORTBbits'
C:\mcc18\h\p18f8520.h:201:Error [1109] type mismatch in redeclaration of 'PORTCbits'

My project does not even reference these files anywhere in code. It uses ifi_picdefs.h. Does anybody have any idea whatsoever how to fix this?
__________________
1139 Alumni
  #2   Spotlight this post!  
Unread 02-02-2005, 19:43
IMDWalrus's Avatar
IMDWalrus IMDWalrus is offline
This is a line...
AKA: Paul
FRC #0818 (Genesis '02)
Team Role: Alumni
 
Join Date: Mar 2003
Rookie Year: 2003
Location: Michigan
Posts: 617
IMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to behold
Send a message via AIM to IMDWalrus
Re: WEIRD compiler error

Which version of the default code are you using?

If you're not using version 2.4 (the one with the camera code), that could be your problem.
  #3   Spotlight this post!  
Unread 02-02-2005, 19:47
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,846
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: WEIRD compiler error

Quote:
Originally Posted by Rickertsen2
I have a project that compiles just fine with older C18 versions, but
when i try to compile it under 2.4 i get the following errors:
C:\mcc18\h\p18f8520.h:169:Error [1109] type mismatch in redeclaration of 'PORTBbits'
C:\mcc18\h\p18f8520.h:201:Error [1109] type mismatch in redeclaration of 'PORTCbits'

My project does not even reference these files anywhere in code. It uses ifi_picdefs.h. Does anybody have any idea whatsoever how to fix this?
I think the problem might be that you have two files of different vintage.
p18f8520.h has to match ifi_picdefs.h, and p18f8520.h has probably changed from the earlier versions of C18.
See if there's a difference between the current default code's version of ifi_picdefs.h and the older one you're using.

P.S. p18f8520.h gets dragged in by the compiler based on the target PIC model called out by the "-p=18F8520" statement in the compile line.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-02-2005 at 20:00.
  #4   Spotlight this post!  
Unread 02-02-2005, 19:56
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: WEIRD compiler error

Quote:
Originally Posted by Mark McLeod
I think the problem might be that you have two files of different vintage.
p18f8520.h has to match ifi_picdefs.h, and p18f8520.h has probably changed from the earlier versions of C18.

P.S. p18f8520.h gets dragged in by the compiler based on the target PIC model.
It looks like you are right That particular union is different in both files. If the compiler automatically drags in p18f8520.h do you have any idea what the purpose of ifi_picdefs.h is?
__________________
1139 Alumni
  #5   Spotlight this post!  
Unread 02-02-2005, 20:32
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,846
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: WEIRD compiler error

Looking more closely I'm not so sure that really is the answer.
I tried removing my p18f8520.h file, then compiling and my project didn't mind a bit that it was gone.
Maybe for some reason the old project is dragging that file in, but shouldn't be.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 02-02-2005, 21:37
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: WEIRD compiler error

Quote:
Originally Posted by Mark McLeod
Looking more closely I'm not so sure that really is the answer.
I tried removing my p18f8520.h file, then compiling and my project didn't mind a bit that it was gone.
Maybe for some reason the old project is dragging that file in, but shouldn't be.
No you were right. I replaced ifi_picdefs.h with a copy of p18f8520.h, added the following code and now it works. I'm not really sure what that code snippet does, but it is includeed in ifi_picdefs and ifi_default checks to see if UNCHANGEABLE_DEFINITION_AREA is defined. If it is not, it throws an error. Everything works fine now. I am going to update the compiler on all my computers, and replace ifi_picdefs.h with the ifi_picdefs.h from the 2005 default code.

#if defined(BANKED)
#error *** Error - Invalid 18f8520 header file!
#else
#define UNCHANGEABLE_DEFINITION_AREA 1
#endif
__________________
1139 Alumni
  #7   Spotlight this post!  
Unread 02-02-2005, 21:41
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,846
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: WEIRD compiler error

Good deal!
Glad it worked out. As you know, it can be really hard to recreate someone else's error sometimes, so sometimes it's just semi-educated guesswork.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #8   Spotlight this post!  
Unread 05-02-2005, 14:09
pakrat pakrat is offline
Rich Ross
no team (The Rat Pack)
Team Role: Alumni
 
Join Date: May 2004
Rookie Year: 2003
Location: Ann Arbor
Posts: 328
pakrat is just really nicepakrat is just really nicepakrat is just really nicepakrat is just really nicepakrat is just really nice
Send a message via AIM to pakrat
Re: WEIRD compiler error

WE just got the exact same problem, how you do you fix it again??
__________________
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPLink Error cloudago Programming 2 01-02-2005 23:00
IMPORTANT regarding the new C Compiler dlavery General Forum 12 14-01-2005 05:05
MPLAB IDE 6.60 Error mchan1111 Programming 8 08-11-2004 20:17
Confusing Compiler Error UrsaMNet Programming 2 28-10-2004 14:32
PHP and Wiki Error Venkatesh Website Design/Showcase 2 24-07-2004 15:51


All times are GMT -5. The time now is 15:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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