![]() |
Re: 2005 default code won't compile
Can you give us the exact error message?
|
Re: 2005 default code won't compile
Quote:
Quote:
|
Re: 2005 default code won't compile
Quote:
You should probably go back to the defaults and get it compiling before you attempt to redirect everything. In MPLAB go to Project -> Build Options... -> Project and clear all fields (and I mean ALL fields) except for Include Path (C:\mcc18\h) and Library Path (C:\mcc18\lib). You can also hit "Suite Defaults" to clear them for you, but make sure you have the Include Path C:\mcc18\h (no blanks). Don't add anything else. |
Re: 2005 default code won't compile
I did fix the error you talked about (I just copied and pasted from the other post). I do know about there being no blank c drive ;)
Everything (but lib and inc, which are set correctly) is already blank. Still nothing. |
Re: 2005 default code won't compile
Quote:
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-Can you compile the default 2.4 code? You show several paths that are not part of the MPLAB default settings, so I assume you set them up. Are you using the "Use Alternate Settings" in MPLAB look under Project -> Build Options... -> Project, then the MPLAB C18 tab? If you are then add the c:mcc18/h path there as well. Your compile line should look like: Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "main.c" -fo="main.o" /i"c:\mcc18\h" -D_FRC_BOARD -D_USE_CMU_CAMERAIf you cannot get the mcc18/h path into the compile statement you might consider uninstalling MPLAB IDE and reinstalling it. |
Re: 2005 default code won't compile
I am also having a problem with printf_lib.h
I can compile the default code, however, if i add the printf_lib.h and .c files that are in the default code directory, and attempt to use the printf function, it gives me the following error: [path]\printf_lib.h:15:Error [1109] type mismatch in redeclaration of 'printf' I am using v2.4 of the compiler (new computer - old version was never installed), and my build paths are all correct. The error occurs whenever i include the printf_lib.h file (ie, i can delete #include "printf_lib.h" and it will compile perfectly... put it back and i get the same error again). Any help would be greatly appreciated. Thanks, Plloyd |
Re: 2005 default code won't compile
Quote:
The new compiler comes with a new printf routine. Adding the old printf routine on top of the default one caused the compiler to get confused about which of the two it should use. Instead, add: #include <stdio.h> to any file that needs to use printf. |
Re: 2005 default code won't compile
Thanks Mark,
that worked beautifully. |
| All times are GMT -5. The time now is 03:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi