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 7965779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:14:46+00:00 2026-06-04T06:14:46+00:00

I’m trying to compile some code for basic USB HID functionality. I’m using a

  • 0

I’m trying to compile some code for basic USB HID functionality. I’m using a PIC18F14K50 with MPLAB 8.43 and the Microchip C18 compiler.

I’m using some standard files from Microchip’s website. Here is my C file and here is my header file.

I’m getting the following error when I build:

Executing: "C:\Program Files\Microchip\mplabc18\v3.40\bin\mplink.exe" /p18F14K50 /l"C:\MCC18\lib" /k"C:\MCC18\bin\LKR" "usb_function_hid.o" "usb_device.o" "enumeration.o" "usb_descriptors.o" /u_CRUNTIME /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C:\LPCUSBDK_Labs\Lab1_files\output\Project Lab 1.cof" /M"C:\LPCUSBDK_Labs\Lab1_files\output\Project Lab 1.map" /W

MPLINK 4.40, Linker

Device Database Version 1.3

Copyright (c) 1998-2011 Microchip Technology Inc.

Error – could not find definition of symbol ‘HIDDescriptor1’ in file ‘./usb_function_hid.o’.

Errors : 1

Link step failed.

The HIDDescriptor1 symbol appears in 2 places in the code: PasteBin line 173 of the C file and PasteBin line 356 of the header file.

This code comes straight from Microchip. I’m not sure why it wouldn’t be linking. I think either it’s designed for another version of the compiler, I’m missing some external dependency, or I’m missing some compiler/linker switches.

Any ideas on what I need to do to get this to build?

  • 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-04T06:14:48+00:00Added an answer on June 4, 2026 at 6:14 am

    In the header file, you have HIDDescriptor1 defined externally. So when you compile usb_function_hid.c, it will compile fine until you try to link it. Then, it cant find that symbol.

    It seems that you have to define HIDDescriptor1 in your own code. Or else it is somewhere else in the source that you downloaded, and you need to link that in as well. But it surely isn’t defined in the .c file.

    EDIT:

    I downloaded and installed the Microchip Application Libraries. There is no longer any mention of HIDDescriptor1 in any of the source. However, usb_function_hid.h details another structure that I assume is a replacement:

    //USB HID Descriptor header as detailed in section 
    //"6.2.1 HID Descriptor" of the HID class definition specification
    typedef struct _USB_HID_DSC
    {
        BYTE bLength;           //offset 0 
        BYTE bDescriptorType;           //offset 1
        WORD bcdHID;            //offset 2
        BYTE bCountryCode;      //offset 4
        BYTE bNumDsc;           //offset 5
    
    
        //USB_HID_DSC_HEADER hid_dsc_header[HID_NUM_OF_DSC];
        /* HID_NUM_OF_DSC is defined in usbcfg.h */
    
    } USB_HID_DSC;
    

    Browsing the example projects, there are many many HID projects, all which build just fine with the C18 compiler. I recommend downloading this library again; you may have an incomplete or older library. The highlighted project below is for the PIC18F14K50.

    Microchip Application Libraries\USB\Device - HID - Keyboard\Firmware

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

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.