![]() |
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.
|
Re: 2005 default code won't compile
Quote:
Project -> Build Options... -> Project "Include Path" should be C:\mcc18\h |
Re: 2005 default code won't compile
Quote:
|
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?
|
Re: 2005 default code won't compile
Quote:
i do have the new compiler |
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.
|
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. |
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. |
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! |
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.
|
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. |
Re: 2005 default code won't compile
Quote:
Typo's are so much fun;) You also don't include mcc18/h, why is that? |
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)? |
Re: 2005 default code won't compile
Primarily printf(), but could be used for other things. Go to the project build settings amd set the directories to "suite defaults" (there's a button).
|
Re: 2005 default code won't compile
I had already tried that to no avail.
|
| All times are GMT -5. The time now is 17:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi