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 Getting rid of Library1 (Read 2526 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Getting rid of Library1
May 21st, 2018 at 5:11am
Print Post  
Tim,

I worked much of this evening refactoring my HC05 Utility program and hit w wall. I get no warnings, no errors but it can't find Library1. 

Everything is attached except BJBuzzer.h/cpp and it is an external reference. I can send it to you if you need it.
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Getting rid of Library1
Reply #1 - May 21st, 2018 at 11:54am
Print Post  
The zip has some weird layout. You have Library1.cpp and Library1.h in with the project sources. This isn't a structure thatĀ  visual micro has suggested or provided and I have no idea what issue you are reporting.

You should work the the "Show all files" button enabled in the solution explorer so you can see the physical file/folder structure.

The visual micro example with Library1 puts it in project/_micro-api/libraries/Library1

That's an important path for local libraries

If you put a source code in the project then it is a project source even if it has the same name as a library.


note: 

If you use windows explorer to change the project structure then you can right click items in the project view that don't exist anymore and click "remove"

If you use "Show all files" view you can right click files or folder and then click "Include in Project" or "Exclude from Project" to use or stop using files from the local project.

Currently files in the root are always compiled because that's what the arduino ide does but it grates with VS so might become an option.

« Last Edit: May 21st, 2018 at 5:43pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Getting rid of Library1
Reply #2 - May 21st, 2018 at 4:53pm
Print Post  
Tim,

I created a new project to see what things look like without my messing with them. One expectation I hold is that if I make no changes to the generated code, it should compile without error. It didn't. The compiler output is included along with a formatted listing of all of the code.

Bob
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Getting rid of Library1
Reply #3 - May 21st, 2018 at 5:07pm
Print Post  
Thanks this appears to be a problem related to the new "vMicro>Compiler>Allow project code to override library code"

I will look at it but you can switch that option off then it should build okay?
  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Getting rid of Library1
Reply #4 - May 21st, 2018 at 5:23pm
Print Post  
That worked. 

Can you point me to the page that describes this feature? I found it a couple days ago but cannot find it right now.

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Getting rid of Library1
Reply #5 - May 21st, 2018 at 5:38pm
Print Post  
Great. It's a new feature and is only mentioned in the release notes at the moment. The docs will be updated over the next 14 days.

If you have code in _micro-api/libraries these are considered external libraries and compiled as such. The new feature should not affect the compile of libraries.

If you add a source code to the project sources (not _mircro-api/) then the question is whether or not you want the same name file compiled if it exists in any library. Historically, both the  project version of the file and the version in the library will be compiled which is why the menu item defaults to OFF. 

To be clear, if we use spi library we have \libraries\SPI\SPI.cpp. If we also add a file to our local project called SPI.cpp then both files will be compiled, unless the new menu item is enabled in which case libraries\SPI\SPI.cpp is ignored.

When you use the menu item the setting is applied to the current project and also made the default for projects where you have never specified a preference.

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint