Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 175769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:45:28+00:00 2026-05-11T13:45:28+00:00

I have a C++ DLL (no code) that I want to expose to .NET

  • 0

I have a C++ DLL (no code) that I want to expose to .NET applications.

After pondering all the options I have/know of/could find (COM, P/Invoke, SWIG, etc.), I’m writing a .NET Class Library (in C++/CLI). Now the resulting DLL (class library) requires the original DLL and its dependencies, too. My problem lies in automagically keeping track of such things, so that applications that use the wrapper don’t have to keep track of the other (native) DLLs (especially if the original DLL(s) develop a new dependancy).

To be more precise (and have something concrete to discuss), I’m trying to wrap cmr, so I write MR, the class library (which depends on cmr, naturally). cmr depends on PNL, OpenCV, and others. When I tried adding a reference to MR in a (C#) project, Visual Studio (2005 SP1) just copied MR.DLL, leaving all the dependencies behind, and then complaining (throwing a FileNotFoundException about missing modules). Manually copying cmr, PNL, etc. to the bin directory fixed the problem.

Without further ado, my question is this: Is there a way for .NET apps to only add a reference to one DLL, and everything just works?

I’ve been scouring through Google and SO, to no avail…

EDIT: mergebin seems the closest to what I’m looking for, but it can only merge a .NET DLL with one native DLL. Too bad one can’t merge native DLLs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:45:29+00:00Added an answer on May 11, 2026 at 1:45 pm

    You might take a look at mergebin, a tool that allows you to combine unmanaged and managed DLLs into one assembly. System.Data.SQLite uses this approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in
I have a DLL that I don't have source code to, but I want
I have a DLL that's compiled, and I don't have the source code for
I have a program that simulates mouse click. Code is something like this: [DllImport(user32.dll,
I have used the following code in a number of applications to load .DLL
I have a bit of code for a dll that is needed by two
Right now we have a dll file that contains all the database calls and
I have some code that references an outside DLL which in production will be
So I have this C .dll source code which I want to use in
I have the following code that works under linux. I want to port it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.