Include Code

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

Hi All,

I want to have library code that is used from a single
directory shared between multiple projects.
This code should not be compiled alone but only when
included into a project.

When I try to include common code into a project it
copies the code to the project directory.
Is there a way around this?

Thanks,
Fred
 
You can have single sources files added to different projects in the
following way:

In a project select Project - Add existing item. In the open file dialog
that is visible you can now select the file you want to add to the project.
Instead of clicking the open button, click on the small down arrow on the
right hand side of the open button. You then see a drop down menu with the
options Open, Open with and Link file. If you choose link file, a link to
the file originating in another directory will be included in your project
(there will be no physical copy of the linked file in your project
directory). In solution designer you can verify that, linked files show a
little arrow in their icon on the left hand site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top