Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi...

anyone please guide me how to create .exe file of a project in vc++ which i can run on other systems also.

P.S: project include 2-3 external libraries(header files).

thanks
Posted

1 solution

This is amazing: you are not asking about development of a project you are asking about creating of ".exe" file. Does it mean that you already have a project? If you do, you already have and ".exe" file, if your project compiles, just look at your output directory which you can see from project settings (or just perform a file search for "*.exe"). If it does not compile, you don't really have a project. So, the question makes no sense.

Perhaps the question is: "How to develop C++ projects which compile to .exe files?". Such question would make sense but answering it would not. This is because you're asking this question at CodeProject's quick Questions & Answers. The answer could be quick, indeed: learn C++ programming from scratch, read a book, for example, something like "C++ for Dummies — Davis, Stephen R. 9780470317266", http://compare.ebay.com/like/150585373013?var=lv&ltyp=AllFixedPriceItemTypes&var=sbar[^], $17.72 on eBay, or something like this.

You really need learning this from scratch, because you seemingly have little idea on what's EXE, compilation or interpretation, otherwise the question would be different. There is nothing wrong about it; everyone started from scratch one time or another. Just start learning.

[EDIT]

To answer the follow-up question.

If your DLLs are .NET assemblies but you don't have their source code and don't want to deploy them as separate file, you can merge them all in one EXE file.

Here is the solution:
http://www.microsoft.com/download/en/details.aspx?id=17630[^],
Merging .NET assemblies using ILMerge[^].

See also: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx[^].

Does it make sense for you?

—SA
 
Share this answer
 
v2
Comments
deepak212 21-Sep-11 16:22pm    
when i am saying that project includes 2-3 external libraries that means i have the code as far as i know and yeah i know that there is .exe file in the project/"project name"/debug folder of VS. My problem is to create a .exe file which do not require dll(if you know) to run so that i can run that on some other computer also.
Sergey Alexandrovich Kryukov 21-Sep-11 17:13pm    
You did not ask about it!

If you have those DLLs and they are the .NET assemblies, there is one interesting solution, let me find it...
If you have source code for these assemblies, you can better include them in your .EXE project. You can do it formally, without any thinkin; no changes are required.

If not, you have to deploy them or require as prerequisite; there is no other way. By the way, what's wrong in just copying them with your application to your output path and deploying all together?
--SA
Sergey Alexandrovich Kryukov 21-Sep-11 17:17pm    
Found it, please see the updated solution, after [EDIT].
--SA
deepak212 21-Sep-11 16:23pm    
and by other computer i mean which do not have those libraries installed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900