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 How to have to main ino file is inside a folder (Read 893 times)
luisr_320
Newbies
*
Offline


Posts: 6
Joined: Jun 30th, 2016
How to have to main ino file is inside a folder
Mar 2nd, 2024 at 6:16pm
Print Post  
Hello. I'm trying to get my .ino file inside a folder so that when it syncs with github I have all files related to the code inside that specific folder. But if I do that, the Build and Upload button gets greyed out. If I move the .ino file to be in the root of the solution, I can Build and upload it again.
Is this a bug or is there a way of doing this?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2628
Joined: Feb 13th, 2019
Re: How to have to main ino file is inside a folder
Reply #1 - Mar 4th, 2024 at 12:28pm
Print Post  
The INO file must be in a folder of the same name, which is also where the project (VCXPROJ etc) are created.  The Solution (SLN) file can be in a different folder, which can be set when creating a project from one of the templates.

If a project contains an "src" folder next to the INO this will also be searched and any code found used, so you can have for example:
MyProject\MyProject.ino
MyProject\src\FurtherCode.ino
MyProject\src\CustomCPlusPlus.h
MyProject\src\CustomCPlusPlus.cpp

The MyProject.ino could even be empty, and all code could be moved into the FurtherCode.ino file.

Does this help at all or do you have a specific desired layout in mind?
  
Back to top
IP Logged
 
luisr_320
Newbies
*
Offline


Posts: 6
Joined: Jun 30th, 2016
Re: How to have to main ino file is inside a folder
Reply #2 - Mar 4th, 2024 at 2:11pm
Print Post  
I see. Thank you for the clarification. Since my project has different types of files, I wanted to sync the project with GitHub and have the code part inside a "Code" folder, 3D parts inside a "3D" folder, etc. But I guess I can shuffle the files to their folders at the end.
Thank you.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint