Results 1 to 5 of 5

Thread: Share single file for several projects without creating DLL

  1. #1
    Join Date
    Jun 2009
    Posts
    404

    Share single file for several projects without creating DLL

    Here is my problem.

    In VS 2010, how to share a file in several class projects in a given solution without creating a DLL. The file consists of a single class for interfacing with the rapid system DLLs (PInvoke). I have several executables (= number of projects) to create using this class. I do not want to create a DLL (no new class library project). But I can not find how to keep VS 2010 to make multiple copies of the file class. Obviously I do not want me having to modify all.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Share single file for several projects without creating DLL

    When you do "add existing item", does that recopy? Usually, I just did a project in these cases, so I created a DLL with all the benefits thereof. And why you do not want to create a DLL?

  3. #3
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Share single file for several projects without creating DLL

    I have a Visual C++ 2005 with several projects. These projects have sources in common, that I added by "Add Existing Item". It is not a copy, I do not understand why in your case it makes a copy.

    But this is not necessarily a good solution. I suggest you rather share your common sources via an additional project in your solution (do not have a "dll", just a simple lib), its still the best solution.

  4. #4
    Join Date
    Jun 2009
    Posts
    404

    Re: Share single file for several projects without creating DLL

    Thank you for your responses.

    And why you do not want to create a DLL?
    Because the programs are distributed to special users a little. I therefore prefer to have a compact application that hold in a single file.

    I confirm that on my installation, the add of an existing item is a copy of the source in the project.

    But this is not necessarily a good solution. I suggest you rather share your common sources via an additional project in your solution (do not have a "dll", just a simple lib), its still the best solution.
    Yes that is what I would do it but I can not: the "class library" generates a DLL. Can not make it generate a static library. I work in C# and I do not know if it has an influence. Have you any idea?

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: Share single file for several projects without creating DLL

    In my opinion, yes, I have never seen a concept of "lib" in C#, its a concept of C++ only basically. If I am not mistaken, a lib is just what you need is some sort of DLL that is part of the project that needs it (so your DLL or EXE)

Similar Threads

  1. Replies: 1
    Last Post: 06-10-2011, 04:26 PM
  2. Replies: 5
    Last Post: 10-08-2011, 06:15 AM
  3. Replies: 1
    Last Post: 13-09-2010, 11:45 PM
  4. Windows 2008 File Cluster - file share scoping
    By Jonas_Bson in forum Windows Server Help
    Replies: 8
    Last Post: 16-03-2009, 09:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,435,639.58443 seconds with 16 queries