Run-time libraries for C++ mixed language application

Y

Yang Pang

I have a project where the GUI is in VB.NET, the libraries
in unmanaged C++ which is wrapped in managed C++ and
compiled as DLL.

The application runs fine on Windows 2000 with VC++
development environment installed, but fails to load on
any Windows 2000 system with only the .NET Framework
(tried .NET Framework SDK too) installed.

Tried suggestions given in "Mixed DLL Loading Problem"
article on MSDN, and the 814472 article. None of these
solved the problem. Installing the whole Visual Studio .NET
works, but is not a practical solution on every client
machine.

Are there any run-time libraries I need to ship with the
application?

Here are the system information:

Devbelopment Envirnment 2002 Version 7.0.9466
..NET Framework 1.0 Version 1.0.3705

Your help will be much appreciated.

Yang
 
C

Carl Daniel [VC++ MVP]

Yang said:
I have a project where the GUI is in VB.NET, the libraries
in unmanaged C++ which is wrapped in managed C++ and
compiled as DLL.

The application runs fine on Windows 2000 with VC++
development environment installed, but fails to load on
any Windows 2000 system with only the .NET Framework
(tried .NET Framework SDK too) installed.

Tried suggestions given in "Mixed DLL Loading Problem"
article on MSDN, and the 814472 article. None of these
solved the problem. Installing the whole Visual Studio .NET
works, but is not a practical solution on every client
machine.

Are there any run-time libraries I need to ship with the
application?

Use depends.exe (included with visual Studio) to determine which other DLLs
your program depends on. One thing to make sure of: make sure not you're
trying to deplpoy a debug build of your application, since the debug
libraries will certainly not be present on machines that lack the
development environment.

Once you've identified the DLLs that you depend on, you can usually identity
Windows Installer merge modules (they're installed in c:\program
files\common files\\merge modules by default when you install VS.NET). You
can then combine those merge modules with your own modules to make an
installer (Deployment projects) that will install your application and
everything that it depends on.

-cd
 
S

Sarat Venugopal

Are you installing the required C/C++ runtime libraries? Note that even the
C runtime is not a "known DLL" anymore (starting from 7.0). Typically you
need to install msvcr7x.dll and msvcp7x.dll, in your app path. You can test
if this is the case by simply creating a console app that links with the
native DLL you have built.

Of course, depends is the ultimate tool for these things. You need to learn
how to redistribute the runtimes properly. Check the documentation for
runtime installation guidelines.

Cheers,
Sarat Venugopal
Huelix Solutions
www.huelix.com
 

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

Top