473,513 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Merging C++/CLI Console App with dll's

3 New Member
Hi all;

I would like to merge a C++/CLI console exe with some dll's to produce
one small package for distribution.

Does anyone know how to do this?

Thanks!
Mar 19 '10 #1
4 5466
RedSon
5,000 Recognized Expert Expert
Visual Studio has a "publish" feature you can look into. Otherwise what kind of packaging scheme are you looking to use? RPM, DEB, you can use nullsoft install suite.
Mar 19 '10 #2
Wylbur
3 New Member
Hi RedSon;


> Visual Studio has a "publish" feature you can look into.

From what I've seen of it, this seems like a web apps tool for installing a
completed web app to a web server - which is not quite what I am after here.

I've yet to see anything relating to a windows console app, but I'll keep looking
after I've posted this.

I would think that there would be a simpler way.

I thought I had found it a while ago, but I have a bit of a problem ...


> Otherwise what kind of packaging scheme are you looking to use?
> RPM, DEB, you can use nullsoft install suite.

What I am after is an exe that is "self-contained", where the dll's are extracted
at runtime and made available to the app.

So far, I've found ILMerge.
http://research.microsoft.com/en-us/...t/ilmerge.aspx


I've tried to use it, but I've ran into a bit of a problem.


Running this from a batch file,
================================================== =
@set exefile="F:\Program Files\Microsoft\ILMerge\ILMerge.exe"
@set dmsvcr90="F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll"
%exefile% /target:winexe /out:test.exe test01.exe %dmsvcr90%
================================================== =


I get the following error message:
================================================== =
An exception occurred during merging:
ILMerge.Merge: Could not load assembly from the location
'F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86
\Microsoft.VC90.CRT\msvcr90.dll'.
Skipping and processing rest of arguments.
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
================================================== =


I've used Windows Explorer to navigate to that folder, and I can see that
the file is indeed there.


The executable was compiled with the following command line parameters
in a build operation with Visual Studio 2008:
================================================== =
/GL /D "WIN32" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MD
/Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /clr:safe
/TP /errorReport:prompt
/FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.dll"
/FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.Data.dll"
/FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.XML.dll"
/FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msc orlib.dll"
================================================== =

Linking with the following:
================================================== =
/OUT:"N:\Projects\testing\Release\test01.exe"
/INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTFILE:"Release\test01.exe.intermediate.mani fest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /LTCG /DYNAMICBASE
/FIXED:No /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT
================================================== =


I tried to add the dll as a reference in project > properties, but it came
back with the following error message:
================================================== =
Could not add a reference to the file
'F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll'
bacause it is neither a .NET assembly or registered ActiveX control.
================================================== =


GRRRRRR!!!

Why could ILMerge not load the assembly?

Could it be because it is "neither a .NET assembly [n]or registered ActiveX control."?

Any ideas?

Thanks for the response!!!
Mar 19 '10 #3
RedSon
5,000 Recognized Expert Expert
I'm pretty sure you can publish and make an .msi file which you can install on your computer.
Mar 19 '10 #4
Wylbur
3 New Member
Hi RedSon;

> I'm pretty sure you can publish and make an .msi file which you can install on your computer.

Perhaps, but I'd rather create a simple executable that doesn't require
installation - much like the executables back in the days of DOS.

From what I've seen so far, I believe that there is a way to do this.
I just haven't figured out the "odds-and-ends" of that process.

Maybe someone else reading this forum has done this before (?)

Thanks for the response!!!
Mar 19 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

19
105747
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method: System.out.print((char)27 + "[2J");
2
10974
by: Chris | last post by:
Hi, Currently, I have a console application written in C# and an unmanaged legacy DLL written in VC++ 6.0. In the DLL's previous application, when an event occurs in the DLL, a windows message would be sent to the host GUI application via PostMessage to WM_USER + X. The GUI application would then execute a function to retrieve data from...
5
6322
by: Publicjoe | last post by:
I am working on a little app which uses colour in the console window. I have created a class to extend the console functionality but the ClearScreen method does not work correctly. I am enclosing a complete project to show what happens. If anybody has an idea of how to fix this, please let me know. Yes I am aware that this is all in .Net 2....
0
1135
by: Naresh Narwani | last post by:
Problem Summary: Merging two different web applications into one create a problem for User Controls. Reason for merging two different Web Application: To share non serializable object information between the Web applications. Problem Statement: Suppose I have two different web applications WebApp1 and WebApp2, both of them have the
0
1589
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is that when I ran it and looked at memory usage (in Windows task manager) it looked as if there was a very slow leak. To isolate the issue:
7
2182
by: Khaled Hussein | last post by:
Hi Every body, I am currently working in aproject where I am stuck in merging an ActiveX control (*.ocx) file into a managed Class Library (*.dll). I want to hide the ActiveX Control in this managed Dll, so that even when things are deployed I don't wanna see two files, but only 1 file which is the dll, and it would contain within it, the...
10
10011
by: n o s p a m p l e a s e | last post by:
Is it possible to merge two DLL files into one? If so, how? Thanx/NSP
0
1232
vikramadith
by: vikramadith | last post by:
I'm having some issues merging dlls into my exe Basically I have three VS projects, one producing an exe, and the other two producing dlls. Let us just call it MyApp.exe, Lib1.dll and Lib2.dll. All are written in C#. MyApp references both dlls. Now, I want the dlls to be merged into the exe, so I used ILMerge (with the Gilma UI) to do so....
3
1369
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
Good Afternoon: I have two questions I was hoping someone can help me with. 1. I've created a app that creates a xml file; the project was constructed as a console window. I want to know is there anyway to suppress the console window from showing? One of the options is I have is to generate the xml file without showing the console window....
1
3726
by: kulabhishek | last post by:
Hello, I have used ILMerge tool to merge the multiple dlls into one. The dlls were merged successfully and the out file was also dll. But when i am using this dll with other application, it is giving me error with Resources. The resources are there in same assembly, with build action None. Like : The resource file is Expression.xml in...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.