Link to home
Start Free TrialLog in
Avatar of Wanting2LearnMan
Wanting2LearnManFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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

I have created a c++ console application and a c++ dll using Visual Studio 2005.  The console application cals into exported functions in the dll.

Everything works fine on my main machine but when I transfer my exe and dll over to another laptop (which does not have visual studio installed) I get the following error:

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

What is wrong?
Avatar of js-profi
js-profi

client needs to install VS2005 runtime. download from MS service.
Avatar of evilrix
I'd suggest you have missing DLLs on the other machine.You can probably use Dependency Walker to identify what is required and what is missing.http://dependencywalker.com/
I'd begin from Dependency Walker as evilrix said.

I think you need to install MS Visual C++ redistributable package:
http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

Also you can try to modify the project settings for your projects - C Run-Time libraries, for example.
Avatar of Wanting2LearnMan

ASKER

Thanks for quick replies.

Ok I found about 5 missing dlls using dependency walker now I am getting this error:

"At least one module has an unresolved import due to a missing function in a delay-load dependent module"
I have also installed the MS Visual C++ redistributable.  

Thanks
Post the names you see in Dependency Walker.

Probably the redistributable package will solve it.
If you cannot, change the project settings.
did you load the dll by LoadLibrary? you better would link an import lib of the dll lib to the app.
This is my complete exe which loads the dll.
 
#include <windows.h>
#include <iostream>

__declspec(dllimport) void WINAPI StartServer(void);

int main()
{
     std::cout<<"Welcome to my program"<<std::endl;

     StartServer();

     return 0;
}





I will post the  depwalker names soon,

Thanks
ASKER CERTIFIED SOLUTION
Avatar of pgnatyuk
pgnatyuk
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok the app loads the dll by statically by import library. the additional module needed must come from dll. you know that by not using extern "C" clause the name of the function serverStart was mangled by c++?
It' WINAPI. _stdcall adds underscore as the prefix and @ with the number of bytes in the end of the name. The the whole decoration here.
You should install the same version of your visual c runtime to the target application other wise you will get such strange errors