Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

creating visual studio C++ setup

Posted on 2010-09-07
19
628 Views
Last Modified: 2012-05-10
I'm trying to create a setup for a C++ project written by another programmer.  I am including the redistributable vcredist_x86.exe as well as the exe and two other dlls it needs using Installshield.  However everytime I try to run the exe after installing it I get an error.  This is just a general C++ Windows project.  I'm wondering  what else I need to include.  I'm just wondering if there is a way through VS 2008 or 2010 to create a setup that will detect the correct dependencies.
0
Comment
Question by:PeterTrefren
  • 9
  • 5
  • 5
19 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 33622939
>> everytime I try to run the exe after installing it I get an error.
Which is?
0
 

Author Comment

by:PeterTrefren
ID: 33622992
"C:\MyProject\MyApp.exe

This application has failed to start because the application configuration is incorrect.  Reinstalling the application may fix this problem."

This application was compiled with Visual Studio 2008 Express.  It is my understanding that C++ projects built with this compiler have problems running on other machines.
0
 

Author Comment

by:PeterTrefren
ID: 33623028
I also will get this error

"The application failed to initialize properly (0xc0150002). Click on OK to terminate the application."
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 40

Expert Comment

by:evilrix
ID: 33623071
You are packaging a release build and not a debug build right? This is the kind of error I'd expect to see if you'd accidentally packaged the wrong version.
0
 

Author Comment

by:PeterTrefren
ID: 33623191
I had the engineer verify that it was created as a release version.  I have a copy of Visual Studio 2010 on my laptop that I plan to bring in tomorrow.  I'm thinking that maybe I might be able to do this as OneClick installation.  I'm not sure.  I don't have a lot of experience with non-VB/C# apps.  I'm just wondering what you're thoughts might be.  I also thought about using a setup project type as well.
0
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 250 total points
ID: 33623944
Firstly, check that the release build of your program runs well on your computer.
If it does, copy it manually on the test computer and check if it runs there.

If it doesn't, open the executable and all application dll's one by one in Dependency Walker. If you see a red line in the walker, probably, you don't install the redistributable package on this computer. Install it. Launch the application again. If it does not work, find all other dll's listed in Dependency Walker and copy them into the application folder. At this point your application should work fine. :)

0
 
LVL 40

Assisted Solution

by:evilrix
evilrix earned 250 total points
ID: 33624358
>> I had the engineer verify that it was created as a release version

Good, then we have ruled out the obvious. :)

The next thing I would have suggested was to use Dependency Walker but I see pgnatyuk beat me to it and since he is far more up on Windows that I (I am a Linux developer) I will step aside and let you two work the issue.

Good luck all.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33624480
@evilrix: please stay here. I didn't want to interrupt you. Just added a scenario I'd follow in such cases.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33624540
Maybe, the most important point :)
After the installation, manually check the your application is fully installed into the right folder: the executable, dll's, all resources are exactly in the place you wanted them to be, all the names are correct.
0
 

Author Comment

by:PeterTrefren
ID: 33629193
Just wanted to let you both know I'm having the engineer I'm working with take a look at Dependency Walker as well as the other items mentioned and I'll try to let you know what we find later in the day.
0
 

Author Comment

by:PeterTrefren
ID: 33629452
When I try to open the exe that will run the application I get errors with loading the following DLLs.

MSVCP80.DLL
MSVCR80.DLL
IESHIMS.DLL
WER.DLL

Additionally with the error log I get the following information:

Error: The Side-by-Side configuration information for "c:\program files\my application\LIBDB_SQL50.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: The Side-by-Side configuration information for "c:\program files\my application\LIBDB50.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

0
 

Author Comment

by:PeterTrefren
ID: 33630482
I've added the correct versions of msvcp80.dll and msvc80.dll to the application directory and now Dependency Walker is not logging them as an issue.  However I'm trying to work through the problem with IESHIMS.DLL and WER.DLL as well as potentially MPR.DLL.
0
 

Author Comment

by:PeterTrefren
ID: 33631210
We found out the issue was that we needed to do a seperate install with the Oracle's Berkley Database package to get the two database DLLs to work.  When we did this the application loaded.  I'm not sure how to award points.  Any suggestions?  I will say that when I saw the log information using Denpendency Walker related to the to database DLLs that raised some suspicions.  The engineer responsible for developing the application was the one who figure out to install the software.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33631835
0
 

Author Closing Comment

by:PeterTrefren
ID: 33632175
Using dependency walker helped to justify potential avenues of questioning that eventually led to a solution.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33633858
>> eventually led to a solution.
Now read your question. From the information you provided there can we imagine that the problem is somewhere around Oracle? We gave you the key - Dependency Walker. "eventually"? Is it grade 'B' for us?
0
 
LVL 40

Expert Comment

by:evilrix
ID: 33634371
>>  Is it grade 'B' for us?

Actually, according to the EE guidelines B is exactly right. We (actually probably you) pointed the asker in the right direction but they will need to do more worrk.

PeterTrefren, One thing I would say is I don't think anything I posted actually helped in this regard. My answer that you've selected only affirms what pgnatyuk said. This being the case I would have no object were you to decide that he should have got all the credit in this case. Since it's your question it's entirely your call.

Finally, I -- for one -- would love to know how you eventually resolve this and I'm sure the info would be very helpful for other. Please do post back with the solution to assist others.

Thanks you kindly and the very best of luck.
0
 

Author Comment

by:PeterTrefren
ID: 33639561
I split the points on advice from pqnatyuk and awarded 'B' to both.  Hope that seems resonable.  Pqnatyuk the links you posted didn't work on my end.  I split the points evenly because both of you mentioned Dependency Walker.  Basically the issue was that the application uses a third party library for accessing the data.  This is something like when you develop an app using MySQL.  The provider of this kind library will also make available a setup package that gets installed before the application goes on.  Its difficult to impossible for something like the setup project type to know what all dependencies are for something like this because some of the late-binding issues.  I should have caught this sooner because of my experience with doing occasional MySQL setups.  It was just one of those situations where you get brought into something at the last minute and I didn't fully understand what tools had been used.   When I saw the log information about the database dlls that got me to thinking. My reasons for crediting Dependency Walker is that although the engineer figured out to use the provider setup "by himself",  I can't help thinking that part of that came from me serveral times mentioning to him that I thought the C++ app installed correctly and that the problem had to do with the database dlls.  My reasoning was driven by the fact that the app was written in VS 2008 and the support DLLs that were missing listed by Dependency Walker where ones related to VS 2005 development.  I'm referring to MSVCP80.DLL and MSVCR80.DLL.  If Dependency Walker was complaining about MSVCP90.DLL and MSVCR90.DLL, that would would make me think it was more of a problem with the application written by the developer.  
0
 
LVL 40

Expert Comment

by:evilrix
ID: 33639643
Hi PeterTrefren,

Thank you for taking the time to post back here and let us (and others) know how you eventually resolved this.

Best regards,

-Rx.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to copy an image file into clipboard C/C++? 1 196
Find Visual Studio Tools 2 111
Issues with C++ Class 19 100
Why  my code (program) build with old compiler? 11 75
The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question