Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7982551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:42:21+00:00 2026-06-04T10:42:21+00:00

I have a folder with some .h and .c files and I want to

  • 0

I have a folder with some .h and .c files and I want to use header files in my projects.

I have included them in “Header Files” folder of my project using “Add Existing Item” but when i try to “#include” them compiler(mplabc18\v3.41) say “unable to locate file xyz.h”

So, what should i do to use these files without copying them into the project folder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:42:23+00:00Added an answer on June 4, 2026 at 10:42 am

    Just add the header to the project using the “add” dialog and select “this file is for this project, use relative path” dont remember if it is exac this text but its something like.

    After that just do the normal declaration in your file:

    #include "your_header.h"
    

    This should work fine.

    –UPDATE

    To work with the new MPLAB X

    Do the follow:

    1. Click on the File-> Project Properties

    2. Select the Conf -> C18 (Global Options) -> mcc18
      For XC8, this is under Conf > XC8 compiler

    3. Click on the “…” button of the propertie “Include directories”

    4. Click on “Browse Button”

    5. Locate you project directory

    6. Click on Open, then Ok and Apply

    7. Build your app !

    Now it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some folder with different files. I want to use something like this:
I have a folder full of files and I want to search some string
I have some PDF files in a public rails folder. I want to set
I have some data files in the resources/ folder for my Rubymotion project. How
I have a Java project in Netbeans and I want to use some classes
I use some .sty-files that are not part of texlive and want to have
i have two projects in eclipse and i want to copy some files from
I have some files I want to use in my unit tests but I
I have a folder, which was a git repo. It contains some files and
I have a folder which contains few files and some directories which I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.