![]() |
In Linux, compiler can't find standard headers
I've been trying to get the default code to compile under Linux, but I've run into some trouble. So far, I've mostly been following the advice in this thread. I installed the C18 compiler under WINE, and that appears to have worked. I can't yet use a makefile because I can't get individual files to compile. For example, I tried to get main.c to compile with this command:
Code:
mcc18 main.c -fo=main.oCode:
Microchip MCC C18 Compiler |
Re: In Linux, compiler can't find standard headers
This thread may help you get it working, but I'm having problems too.
When I try to compile using the stock configure.py, the wrong processor is used and I run into an "Unknown processor" error. I'm currently working on trying to find where the __18F8722 macro is defined. (actually, it defines that for an older processor... that's what it should be.) Does anyone know? |
Re: In Linux, compiler can't find standard headers
Quote:
If all else fails, I suppose we can just #define that macro inside p18cxxx.h. However, configure.py isn't my only problem; I cannot even compile one source file on its own. If you do this: Code:
mcc18 main.c -fo=main.o |
Re: In Linux, compiler can't find standard headers
I have a very, very, ugly and cumbersome workaround for the header problem.
If you edit every attempt in the code that includes a mcc18 header (e.g. #include <adc.h>) to include the header from the local directory, it will work. For example, on my computer, mcc18 is installed in ~/.wine/drive_c/mcc18, and the default code is in ~/.wine/drive_c/first/default_code. I created a link in the default code directory with this command: Code:
ln -s ../../mcc18/h .Code:
#include "h/p18c452.h"In any case, if absolutely necessary, changing all these #includes is possible, but if anyone knows of a better solution, please tell me. |
| All times are GMT -5. The time now is 04:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi