Go to Post "By three ways we may learn wisdom: first is by reflection, which is noblest; second by imitation, which is easiest; and third by experience , which is the bitterest." - bEdhEd [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 20-01-2005, 22:08
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
2005 default code won't compile

I just tried compiling the 2005 default code v2.4 released on 1/12/05 and for some reason it refuses to compile. It says that it can't find the definition for function printf and stops the build. This is the code with absolutely no modifications. Just wondering if anybody has an idea what might be wrong.
  #2   Spotlight this post!  
Unread 20-01-2005, 22:53
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,792
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: 2005 default code won't compile

Quote:
Originally Posted by Robby
I just tried compiling the 2005 default code v2.4 released on 1/12/05 and for some reason it refuses to compile. It says that it can't find the definition for function printf and stops the build. This is the code with absolutely no modifications. Just wondering if anybody has an idea what might be wrong.
Check the option settings of MPLAB.
Project -> Build Options... -> Project
"Include Path" should be C:\mcc18\h
"Library Path" should be C:\mcc18\lib
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 20-01-2005, 22:58
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
Re: 2005 default code won't compile

Quote:
Originally Posted by Mark McLeod
Check the option settings of MPLAB.
Project -> Build Options... -> Project
"Include Path" should be C:\mcc18\h
"Library Path" should be C:\mcc18\lib
those are correct, it compiles code from last year and the 2005 code released on 1/7/05
  #4   Spotlight this post!  
Unread 20-01-2005, 23:50
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: 2005 default code won't compile

The IFI site says that version 2.4 of the default code "works only with C18 Compiler (ver 2.4) from Microchip". Have you obtained and installed the new compiler?
  #5   Spotlight this post!  
Unread 21-01-2005, 11:26
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
Re: 2005 default code won't compile

Quote:
Originally Posted by Alan Anderson
The IFI site says that version 2.4 of the default code "works only with C18 Compiler (ver 2.4) from Microchip". Have you obtained and installed the new compiler?

i do have the new compiler
  #6   Spotlight this post!  
Unread 21-01-2005, 11:45
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: 2005 default code won't compile

Could you paste the exact error that the compiler is giving you? It would help us diagnose your problem.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #7   Spotlight this post!  
Unread 24-01-2005, 11:10
cibressus53's Avatar
cibressus53 cibressus53 is offline
Registered User
#1397
 
Join Date: Oct 2004
Location: ajax
Posts: 14
cibressus53 is on a distinguished road
Re: 2005 default code won't compile

i'm experiencing the same problem, the exact error says

cannot find deffinition for function "printf" in (whatever file it's being called it)

it gives no compile error, just a build fail.
__________________
EMAIL: TERRYnospamP AHT MELDSTARspammenot DAWT COM
  #8   Spotlight this post!  
Unread 24-01-2005, 12:43
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,792
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: 2005 default code won't compile

Do either of you still have the old compiler installed as well as the new compiler?

It seems like you are linking with an earlier version of the compiler standard library clib.lib.
That's where printf should now be coming from. Older compiler versions didn't have a printf in the library and teams used the IFI version in the project printf_lib as a substitute.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 24-01-2005 at 13:12.
  #9   Spotlight this post!  
Unread 24-01-2005, 14:34
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: 2005 default code won't compile

Good call, Mark McLeod!.
I had issues initially, but based on past work experience, removed the old C ompiler and installed the new C compiler and errors went away. Some experienced computer users do this as a matter of SOP (standard operating procedure). Removing the old compiler program as completely as possible and installing the new MPLAB C-compiler may be your ticket to solving this kind of problem is good advice for high school students and for those of us who are a few year's removed from high school!
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #10   Spotlight this post!  
Unread 24-01-2005, 15:08
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,562
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: 2005 default code won't compile

The readme file for the new compiler states that it can't be installed at the same time as the old compiler. They did make a change so that any newer compiler can be installed at the same time as 2.4, but it's not backwards compatible.
  #11   Spotlight this post!  
Unread 28-01-2005, 12:50
ElGeeko's Avatar
ElGeeko ElGeeko is offline
Registered User
AKA: Kyle
#1375 (Megabites)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Aurora, CO
Posts: 7
ElGeeko is an unknown quantity at this point
Send a message via AIM to ElGeeko Send a message via MSN to ElGeeko
Re: 2005 default code won't compile

I started off never having installed anything but MCC18 v2.4 on the team laptop (along with the GUI) and I still run into problems.

Code:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8520 "control.c" -fo="c:\code\code_v2.4\control.o" /i"C:\Dev-Cpp\include" /i" c:\code\code_v2.4" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
c:\code\code_v2.4\control.c:12: unable to locate 'ifi_aliases.h'
c:\code\code_v2.4\control.c:13: unable to locate 'ifi_default.h'
c:\code\code_v2.4\control.c:14: unable to locate 'ifi_utilities.h'
c:\code\code_v2.4\control.c:15: unable to locate 'user_routines.h'
c:\code\code_v2.4\control.c:16: unable to locate 'user_Serialdrv.h'
c:\code\code_v2.4\control.c:17: unable to locate 'user_routines.c'
error 1 spawning c:\mcc18\bin\cpp18
Halting build on first failure as requested.
BUILD FAILED: Fri Jan 28 00:07:44 2005
So, did I do something really stupid?
  #12   Spotlight this post!  
Unread 28-01-2005, 13:10
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,792
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: 2005 default code won't compile

Quote:
Originally Posted by ElGeeko
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8520 "control.c" -fo="c:\code\code_v2.4\control.o" /i"C:\Dev-Cpp\include" /i" c:\code\code_v2.4" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
The space between the quote and drive /i" c:..." is "driving" it batty.
Typo's are so much fun

You also don't include mcc18/h, why is that?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-01-2005 at 13:14.
  #13   Spotlight this post!  
Unread 28-01-2005, 15:45
ElGeeko's Avatar
ElGeeko ElGeeko is offline
Registered User
AKA: Kyle
#1375 (Megabites)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Aurora, CO
Posts: 7
ElGeeko is an unknown quantity at this point
Send a message via AIM to ElGeeko Send a message via MSN to ElGeeko
Re: 2005 default code won't compile

I think I was trying to test out other include files but I originally did include mcc18/h and c:\mcc18\h as well as c:\code\code_v2.4. Of note also is that when I try and just compile the default code, every other source file has a similar error (the compile halts on first error after trying control.c).

Also, I was trying to do this in the gui, maybe I should do it right and go command line?

UPDATE:
Now the problem is that compiler cannot find stdio.h. What is stdio used for in this code (i.e. is it just used for printf and such)?

Last edited by ElGeeko : 28-01-2005 at 18:15.
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
2005 default code kevin.fort Programming 33 20-01-2005 16:32
2005 RC Master Code or yaniv Programming 8 12-01-2005 12:05
2005 Manuals, FRC Default Code, Other resources Venkatesh General Forum 4 08-01-2005 14:06
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Is default code already loaded? quickie25 Electrical 8 19-02-2004 22:51


All times are GMT -5. The time now is 17:57.

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