Visual C++ Developer Center > Visual C++ Forums > Visual C++ Language > How to merge exe(of managed and unmanaged code) and dlls into single exe ?
Ask a questionAsk a question
 

AnswerHow to merge exe(of managed and unmanaged code) and dlls into single exe ?

  • Monday, November 02, 2009 11:17 AMtechoptimist Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,
    My VC++ application(managed code) uses unmanaged code library(.lib) and am using VS2005.
    During deployment, I also need to send some dlls along with the exe. I just want all the modules (external dlls to be deployed and the exe) into a single exe.
    I tried using ILMerge, but when i run the merged exe it throws up exception as "bad unmanaged code entrypoint". But if i try the same with pure managed code(without any unmanaged lib included), then the merged exe runs fine.
    I also tried Netz. Could not successfully run with this too. Pure managed code runs fine here too.

    So, clarification i need is whether the exe generated from a code(which has both managed and unmanaged code) can be merged with dlls? if yes, pls let me know the steps too.

    Thanks in advance

Answers

All Replies