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) VM doesn't find header file (Read 2566 times)
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
VM doesn't find header file
Dec 11th, 2022 at 6:39pm
Print Post  
Trying to build Arduino project and getting the error:
http://e.pc.cd/XfqotalK
The same for release mode.
http://e.pc.cd/sfqotalK
File RTClib.h definitely exists and path to its location specified
http://e.pc.cd/juqotalK

Visual Micro was installed yesterday (so, it is latest one).
Visual Studio 2022 community version.

Please advice.



« Last Edit: Dec 11th, 2022 at 6:41pm by VSdev »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #1 - Dec 11th, 2022 at 7:48pm
Print Post  
Please provide the information requested in the yellow box above.

Thanks
« Last Edit: Dec 11th, 2022 at 8:30pm by Tim@Visual Micro »  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: VM doesn't find header file
Reply #2 - Dec 11th, 2022 at 8:55pm
Print Post  
Thank you for your attention.
I'm novice for VM and did not know about its verbosity. Looked into it I found that VM by some reason ignores one config lines and gets other:
http://e.pc.cd/p2qotalK
Why?

I'm totally confused its behavior. Is there some strict rules defining how to make actual config of VM's include directories?

You say local libraries don't work, put libraries in the sketchbook\libraries folder. But in this current case it failed to find library located in proper place:
http://e.pc.cd/CuqotalK

I think I'm unable to catch rules of VM's paths configuration. Could you help me to understand it or refer to proper place in doc where it is clearly described?
« Last Edit: Dec 11th, 2022 at 8:58pm by VSdev »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #3 - Dec 11th, 2022 at 11:08pm
Print Post  
Hello,

It is important to follow the guide in yellow above. This will show your configuration and answer your  questions.

Thanks
  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: VM doesn't find header file
Reply #4 - Dec 12th, 2022 at 6:29pm
Print Post  
Sent log to email
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #5 - Dec 13th, 2022 at 2:35am
Print Post  
Thanks for the output. I think the text file probably needs to be saved in UTF8 so that we can see your paths correctly.

For example, the sketch book path shows as this in the file you sent.

C:\Users\Oleg\OneDrive\Документы\Arduino

A few points of note:-

When working with Arduino you do not need to set the paths of any libraries. The paths are worked out automatically based on the Arduino specification and the design of your chosen hardware/toolchain.

Visual Studio is unable to compile Arduino or understand the Arduino specification. Visual Micro handles the compile and keeps the relevant properties of the project property pages up to date. Those properties are used purely for intellisense. They have no bearing on compliation.

Unless you create a C++ Shared Library project for a library (and add a project reference), a library must reside in one of the published locations. 1) IDE\Libraries 2) Platform\Libraries 3) Sketchbook\Libraries

Sketchbook\Libraries is where user installed libraries are normally placed. They have the highest priority in terms of duplicate name resolution. 1) has the lowest priority but if a library name is unique then the priority is unimportant.

When testing it is recommended that you switch the debugger off. You can usually do that by changing the configuration name on the toolbar from Debug to Release. Swithcing debug off won't resolve any issues, it simply makes the compile smaller and simpler.

Because I can't see the utf8 path of your sketchbook the RTClib can be placed in your IDE\Libraries folder that looks to be ries"

Click "vMicro>general>rescan toolchains" after changing a library location or installing a library outside of the VS IDE while it is open  (or restart the ide).

Do not attempt to include library sources into the project manually. This would cause an invalid build because libraries are not compiled alongside project code. They are compiled seperately and in some cases, depending on the spec. file of the library they are archived into .a files.

Visual Micro does support utf8 paths but the sketchbook folder you have set is a concern. Visual Micro allows you to change the SketchBook folder in the "IDE Locations" window. You could change it to simpiler text as an experiment.
C:\Users\Oleg\OneDrive\Документы\Arduino

I hope this helps. If not please zip your project and the RTCLib that you are using so that we can replicate the issue.

Adding a library via the "Add Library" menu or the "Library Manager" is a core feature, it wouldn't normally be a problem so the utf8 unicode path is a prime candidate for the issue. Please let us have the text of the actual path you have set in your sketchbook.

Thanks 



« Last Edit: Dec 13th, 2022 at 2:37am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #6 - Dec 13th, 2022 at 4:56pm
Print Post  
We have been able to reproduce this with your sketchbook unicode path. We are looking into the issue and will release a fix over the next few days.

We don't need any more info from you.

A workaround is to use the IDE Locations in visual micro or the Arduino IDE file>preferences to specify a sketchbook path that is simpler. UTF8 paths are supported but we certainly have an issue with the chars in the path you are using.

Thanks for the post
  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: VM doesn't find header file
Reply #7 - Dec 13th, 2022 at 6:32pm
Print Post  
Thank you for workaround. 
I suspected the utf8 path is difficult for visual micro. So I have found workaround, moving project to the directory with simple path and specifying it on optional sketchbook location.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #8 - Dec 13th, 2022 at 7:31pm
Print Post  
Thanks, we have a lot of code handling for utf8 but it wasn't enough!
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM doesn't find header file
Reply #9 - Jan 27th, 2023 at 3:50pm
Print Post  
Update. Visual Micro Utf8 handling was improved in recent versions but the path you are trying to use is not utf8. We tried the arduino ide with your path and it also fails.

Simpler paths probably work better. The visual micro options allow for all underlying paths (build, core, hardware etc) to be changed.
« Last Edit: Jan 27th, 2023 at 3:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint