Error [1027] unable to locate 'p18F1320.h'

Author
blueroomelectronics
Super Member
  • Total Posts : 247
  • Reward points : 0
  • Joined: 2006/12/10 10:25:17
  • Location: Toronto, Canada
  • Status: offline
2007/10/21 07:54:22 (permalink)
0

Error [1027] unable to locate 'p18F1320.h'

It's embarrasing to ask as it seems like such a simple error, but I've got MPLAB 7.62 and downloaded the student edition of C18 and did the default install.

I get this error on line #1 of my program

#include <p18F1320.h>
 
Error [1027] unable to locate 'p18F1320.h'


Smart Kits Build Smart People
http://www.blueroomelectronics.com
#1

13 Replies Related Threads

    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:01:45 (permalink)
    0
    I prefer doing like this

    #include <p18cxxx.h>



    Based on selected CPU, the correct include will be brought in. I learnt it by Microchip Smile

    Anyway, also do check the Include Path in your Build Options.

    GENOVA :D :D ! GODO
    #2
    blueroomelectronics
    Super Member
    • Total Posts : 247
    • Reward points : 0
    • Joined: 2006/12/10 10:25:17
    • Location: Toronto, Canada
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:11:33 (permalink)
    0
    Still get the error, what "path" do I need to fix? (within XP or MPLAB?)

    Error [1027] unable to locate 'p18cxxx.h'
    MPLAB C18 v3.12 (demo)

    My include path is (from within MPLAB tool locations) $(INCDIR)
    C:\MCC18\h
    post edited by blueroomelectronics - 2007/10/21 08:14:09


    Smart Kits Build Smart People
    http://www.blueroomelectronics.com
    #3
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:19:28 (permalink)
    0
    the path is in MPLAB, and is the one you mention...

    Can you try searching the hard disk for that file(s) ? To ensure it's there

    GENOVA :D :D ! GODO
    #4
    blueroomelectronics
    Super Member
    • Total Posts : 247
    • Reward points : 0
    • Joined: 2006/12/10 10:25:17
    • Location: Toronto, Canada
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:27:34 (permalink)
    0
    The directory and scads of .h files including p18cxxx.h are there.

    Here's the verbose error

    Executing: "C:\MCC18\bin\mcc18.exe" -p=18F1320 "C test.c" -fo="C test.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
    C:\Junebug Programs\C test.c:1:Error [1027] unable to locate 'p18cxxx.h'
    MPLAB C18 v3.12 (demo)
    Copyright 1999-2005 Microchip Technology Inc.
    Days remaining until demo becomes feature limited:  58
    Halting build on first failure as requested.
    post edited by blueroomelectronics - 2007/10/21 08:29:07


    Smart Kits Build Smart People
    http://www.blueroomelectronics.com
    #5
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:29:37 (permalink)
    0
    Hmmm, funny then sad

    Can you recreate the Workspace? Or try to make up a simple project/source with a single file, and a main() function?

    GENOVA :D :D ! GODO
    #6
    blueroomelectronics
    Super Member
    • Total Posts : 247
    • Reward points : 0
    • Joined: 2006/12/10 10:25:17
    • Location: Toronto, Canada
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:33:49 (permalink)
    0
    Sure using the Wizard? no problem. I'll add the Main () too.


    Smart Kits Build Smart People
    http://www.blueroomelectronics.com
    #7
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:38:34 (permalink)
    0
    Well, yes, I use it and it works.

    GENOVA :D :D ! GODO
    #8
    blueroomelectronics
    Super Member
    • Total Posts : 247
    • Reward points : 0
    • Joined: 2006/12/10 10:25:17
    • Location: Toronto, Canada
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 08:39:16 (permalink)
    0
    Hmm that sort of works, must have been a corrupt file when I used the Wizard. I now just get a syntax error but that's something I can get around. I thought I did try a new project and it failed before... Hmm.

    Edit works like a charm thanks Dario

    Here's my useless but it compiles program Smile
    #include <p18cxxx.h>
    void main (void)
    {
    }


    Any good books on C18 you can recommend?
    post edited by blueroomelectronics - 2007/10/21 08:47:15


    Smart Kits Build Smart People
    http://www.blueroomelectronics.com
    #9
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/21 09:01:40 (permalink)
    0
    Smile good!

    As for books, well, I learnt C in 1988-89 on TurboC manual (Borland) and K&R; then Microsoft VC for Windows, and C++.
    I took a look at C18 features only in its Docs: they're good enough, then, going by examples and the forum, I got most of it working okay.




    GENOVA :D :D ! GODO
    #10
    ren
    Super Member
    • Total Posts : 654
    • Reward points : 0
    • Joined: 2006/04/20 16:17:49
    • Location: So Cali
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/22 10:53:56 (permalink)
    0
    ORIGINAL: blueroomelectronics

    Any good books on C18 you can recommend?

     
    I agree with Dario that studying the C18 examples available is #1.  Although I have had Kerninghan & Ritchie's "The C Programming Language" on my bookshelf for many years too, the book that I seem to open the most is my little O'Reilly "C Pocket Reference".  When I was first starting out with C ('92), the beginner book that was most clear for me was on Turbo C by Herbert Schildt.  Looks like he has a website now here... http://www.herbschildt.com  
    #11
    tlaszlo
    Starting Member
    • Total Posts : 71
    • Reward points : 0
    • Joined: 2007/02/02 02:20:18
    • Location: 0
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/22 11:34:39 (permalink)
    0
    Hay

    p18f1320h.txt

    Toth Laszlo
    #12
    ren
    Super Member
    • Total Posts : 654
    • Reward points : 0
    • Joined: 2006/04/20 16:17:49
    • Location: So Cali
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/22 12:09:04 (permalink)
    0
    Hay!  http://en.wikipedia.org/wiki/Hay
    post edited by ren - 2007/10/22 13:42:59

    Attached Image(s)

    #13
    ren
    Super Member
    • Total Posts : 654
    • Reward points : 0
    • Joined: 2006/04/20 16:17:49
    • Location: So Cali
    • Status: offline
    RE: Error [1027] unable to locate 'p18F1320.h' 2007/10/22 12:15:45 (permalink)
    0
    ORIGINAL: tlaszlo
    p18f1320h.txt

    WT_ ???
    #14
    Jump to:
    © 2018 APG vNext Commercial Version 4.5