problem with MPLAB IDE

Discussion in 'Embedded Systems and Microcontrollers' started by Rushan, Dec 12, 2013.

  1. Rushan

    Thread Starter New Member

    Nov 20, 2013
    i just tried to compile

    #include <htc.h>
    void main(void)

    program.because i want to learn how to compile a c program using MPLAB i installed MPLAB IDE and HITECH C compiler.and created a new project according to the given instructions by the HITECH C compiler documents.but when i build the project it gives the following error.

    Clean: Deleting intermediary and output files.
    Clean: Deleted file "C:\Users\RushanP\Desktop\mysampleproj\test.cce".
    Clean: Deleted file "C:\Users\RushanP\Desktop\mysampleproj\mysampleproj.mcs".
    Clean: Done.
    Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin\picc.exe" -C -E"test.cce" "test.c" -O"test.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877
    Halting build on first failure as requested.
    BUILD FAILED: Thu Dec 12 11:26:46 2013

    please help me to fix this...
  2. JohnInTX


    Jun 26, 2012
    I've had problems with HiTech not reporting errors in Win7-64 Pro in the build window. If that applies to you, see if there is a a test.err file or see the compiler listing/linker map files. My solution was XC8 on Win7.

    Try adding some code in main() to see if it's confused due to no code but I doubt if that's it.

    You can send a request to microchip on their support site. They've probably have heard of this one and may have a solution.

    Good luck.
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    You should also get some sort of error code i think. But anyway put some code in the main function before trying one more
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    I suspect the compiler is optimizing main () out since it doesn't do anything, then throws an error since there is no code to produce...