Add as a link in AS 6.2

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In a previous thread Clawson says

 

Quote:

how to use a single "usart_routines.c" with several different projects.

the "trick" is that when you "add existing" to add the UART_routines.c to your new project you will note that the [Add] button has a drop arrow to the right. Select that and you will see there is a second add option that is "Add as link". This makes the .c file visible to your project but does NOT copy it from the original location. So you keep just one master copy on your drive and all your projects "link" to it.

 

When I go to add a file to a project, I right click on the project and when I hover over Add I have the choices of adding a New Item, and Existing Item, or a Folder.  I don't get the option to add as a link.  Am I doing something wrong?

 

And lets say I do get to add a file as a link.  If I modify the file in my project with it modify the master copy so it gets changed everywhere?

 

I am making my own libraries, but having all the files I use in one place and adding them as a link sounds useful.

 

thanks for your help.

 

mark

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's an option on the 'Add' button in the file selection dialogue:

 

Alignment_Screenshot_AddAsLinkDialog

https://msdn.microsoft.com/en-us...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkThomas wrote:
lets say I do get to add a file as a link.  If I modify the file in my project with (sic?) it modify the master copy so it gets changed everywhere?

Yes it will - which could cause havoc with other projects that are also using the same file!

 

That's why I prefer not to do this!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Got it.  Thanks!

 

Beautiful black cat you have.  I have one of those too.  He is totally spoiled.