Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Error Compiling - Library HID-Project (Read 12228 times)
the droid
Newbies
*
Offline


Posts: 4
Joined: Dec 3rd, 2015
Error Compiling - Library HID-Project
Dec 3rd, 2015 at 3:26am
Print Post  
The below sample code utilizes the https://github.com/NicoHood/HID library.  

Code (C++)
Select All
#include <HID-Project.h>
#include <HID-Settings.h>

void setup() {
  Keyboard.begin();
  System.begin(); 
}

void loop() {
  // put your main code here, to run repeatedly:
  Keyboard.press(KEY_ENTER);
  Keyboard.release(KEY_ENTER);
  Keyboard.write(KEY_ENTER);
   Consumer.write(MEDIA_PLAY_PAUSE);
}
 



It compiles fine under the Arduino 1.6.6 IDE.  Utilizing the latest Visual Micro (with visual studio 2013) the build process error out. Log file attached.

Any help would be appreciated.


« Last Edit: Dec 12th, 2015 at 6:13pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling
Reply #1 - Dec 3rd, 2015 at 2:16pm
Print Post  
Hi,

There is a new special folder for libraries called \extras which we need to support in Visual Micro. Support will be added during the next week.

You can see in your error report(useful thanks) that the hid.h can't be located. This is because it is in the extras folder.

AbsoluteMouse.cpp:In file included from
AbsoluteMouse.h:29:17: fatal error: HID.h: No such file or directory
:#include "HID.h"

  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling
Reply #2 - Dec 6th, 2015 at 8:54pm
Print Post  
Hi,

This issue isn't what I thought. The problem is because arduino 1.6.6 has some new code to automatically discover libraries hidden in other libraries. This new feature will shortly be in visual micro but for now you have to do it the way things were done until a couple of weeks ago. #Include <HID.h> in your main sketch.ino.

However you need to wait for the next update in a few days because there is also a change to the way version numbers work and teensy uses the new format in the HID library.

  
Back to top
WWW  
IP Logged
 
the droid
Newbies
*
Offline


Posts: 4
Joined: Dec 3rd, 2015
Re: Error Compiling
Reply #3 - Dec 10th, 2015 at 4:55am
Print Post  
Just tried the latest version 1512.10.0. But getting the same (or similar) errors.

added the #include <HID.h>

Code (C++)
Select All
#include <HID-Project.h>
#include <HID-Settings.h>
#include <HID.h>


void setup() {
  // put your setup code here, to run once:
  Keyboard.begin();
  Consumer.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  Keyboard.press(KEY_ENTER);
  Keyboard.release(KEY_ENTER);
  Keyboard.write(KEY_ENTER);
   Consumer.write(MEDIA_PLAY_PAUSE);
}
 



Log attached
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling - Library HID-Project
Reply #4 - Dec 14th, 2015 at 3:13am
Print Post  
Thanks, although the library now appears to compile the same as the arduino ide (using verbose output in both as a test)  I agree it fails as soon as some classes are referenced. 

It's strange I can't see any difference in the arduino build but there obviously is. I will try to find some time during the next week to look at the arduino builder source code again.
  
Back to top
WWW  
IP Logged
 
PeteF
Newbies
*
Offline


Posts: 1
Joined: Jan 8th, 2016
Re: Error Compiling - Library HID-Project
Reply #5 - Jan 8th, 2016 at 3:30pm
Print Post  
Hi, have you had time to investigate this issue yet?

Being new to Visual Studio I presumed the compile error was of my own making but eventually found this post.

May be nothing related but this is the only library that I use which makes use of the  ".hpp" file type.
« Last Edit: Jan 8th, 2016 at 3:32pm by PeteF »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling - Library HID-Project
Reply #6 - Jan 8th, 2016 at 4:29pm
Print Post  
Hi,

No sorry been clearing up more frequently hit bits from the changes of arduino end last year.

This weekend should see the final rendition and then over the next week or so hope to look at this.

In the meantime you can use "file>preferences>external editor" option of the arduino ide which allows code to be edited in VS then uploaded via the arduino ide with a single click.
  
Back to top
WWW  
IP Logged
 
the droid
Newbies
*
Offline


Posts: 4
Joined: Dec 3rd, 2015
Re: Error Compiling - Library HID-Project
Reply #7 - Feb 19th, 2016 at 3:50pm
Print Post  
Hi,

Has this been resolved?


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling - Library HID-Project
Reply #8 - Feb 19th, 2016 at 8:58pm
Print Post  
Hi,

Over the past month there have been a lot of releases with library changes to bring inline with arduino 1.6.7

Hopefully you find it works with the latest release.

Hope to hear.
  
Back to top
WWW  
IP Logged
 
the droid
Newbies
*
Offline


Posts: 4
Joined: Dec 3rd, 2015
Re: Error Compiling - Library HID-Project
Reply #9 - Feb 19th, 2016 at 10:42pm
Print Post  
It appears that it is still broken.

  
Back to top
 
IP Logged
 
topin89
Newbies
*
Offline


Posts: 1
Joined: Oct 23rd, 2017
Re: Error Compiling - Library HID-Project
Reply #10 - Oct 23rd, 2017 at 11:48am
Print Post  
It is not broken now, unless library is in folder:
%UserProfile%\Documents\Arduino\library\HID
That is, named exactly the same as
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\HID
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error Compiling - Library HID-Project
Reply #11 - Jan 28th, 2018 at 2:37am
Print Post  
which board were you using?
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint