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
Normal Topic HID Nicohood library working fine with arduino IDE, error compiling from visual micro (Read 3329 times)
Itsmetoo
Junior Member
**
Offline


Posts: 15
Joined: Jan 25th, 2015
HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Dec 29th, 2018 at 4:23pm
Print Post  
Hi all, 
this library seems to trigger an issue with visualmicro/visualstudio:
https://github.com/NicoHood/HID

When compiled with arduino all is ok.
But compiling with visual micro, it gives 
"Multiple attempts were made to resolve the same include path: \\server\dfs\privates\Develop\Arduino\libraries\HID\src"

built properties attached... 

Any idea how to fix this (pleeeease don't tell me to use arduino IDE  Wink )
« Last Edit: Dec 29th, 2018 at 4:26pm by Itsmetoo »  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #1 - Dec 29th, 2018 at 6:15pm
Print Post  
Hi,

This might be related to unc path names. To help know if that is the issue please map \\server\dfs\privates\\development (or part of the path) to a drive letter in windows explorer. Then set your sketchbook path to be the mapped path instead of the unc path you have used.

Thanks
  
Back to top
IP Logged
 
Itsmetoo
Junior Member
**
Offline


Posts: 15
Joined: Jan 25th, 2015
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #2 - Dec 29th, 2018 at 8:32pm
Print Post  
Hi!

happy to see I'm not the only crazy working during this period Smiley, thx!

Unfortunately, mapped drive didn't change anything. I'm also using a lot of other libraries witout issues.
I think that this lib is using a strange structure of files, with multiple relative paths in includes. Might be a problem, but working perfectly with aduino ide...

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #3 - Dec 30th, 2018 at 2:03pm
Print Post  
Thanks very much Smiley

I discovered the issue. There is a simple workaround to rename the lmyDocuments\ibraries\HID-master folder to something unique such as libraries\HIDLib. Then click Rescan in Visual Micro or restart the IDE.

The issue is that the nicohood library depends on the "HID" library that is installed with the hardware core, in this case the avr/leonardo. Normally you can override libraries by adding them to mydocuments\libraries with the same name. To detect duplicate names the "-master" (in the name from github zips) is ignored. Therefore your nicoHood library prevents the avr HID lib from being found.

BY renaming the nicoHood lib folder to something unique Visual Micro will then be able to resolve the #include "HID.h" to the avr HID lib that the nicoHood code references.

Calling a library HID and then relying on code in another library also called HID isn't a good idea Smiley Maybe Visual Micro can re-search and force a "duplicate" lib into the compile if a header can't be resolved. I'll look into it.





« Last Edit: Dec 30th, 2018 at 2:08pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Itsmetoo
Junior Member
**
Offline


Posts: 15
Joined: Jan 25th, 2015
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #4 - Dec 30th, 2018 at 3:51pm
Print Post  
GREAT! it is working, thank you!
I still don't really get why the arduino IDE has no issue with it, but it is not really relevant anymore Wink

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #5 - Dec 30th, 2018 at 4:15pm
Print Post  
Great, I just updated Visual Micro to find the library in the hardware\libraries folder if a header can't be found. This means that I have a NicroHood HID lib in sketchBook\Libraries and one in hardware\Libraries.

I guess the arduino ide is doing same. It's not the best idea in the world but works for the nicoHood lib Smiley

Interim updates can be found here when available https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

« Last Edit: Dec 30th, 2018 at 4:16pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #6 - Dec 30th, 2018 at 4:54pm
Print Post  
There is now an update in the work in progress. It also contains caching of the linkage file for libs that use dot-a-linkage. This applies to the nicoHood HID library, cached compile will be much faster.

Download link is in the "work in progress" thread here
« Last Edit: Dec 30th, 2018 at 4:54pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Itsmetoo
Junior Member
**
Offline


Posts: 15
Joined: Jan 25th, 2015
Re: HID Nicohood library working fine with arduino IDE, error compiling from visual micro
Reply #7 - Dec 31st, 2018 at 9:17am
Print Post  
Thank you so much, you are doing an amazing job!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint