Wanting2LearnMan
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?
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?
client needs to install VS2005 runtime. download from MS service.
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.co m/
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.
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.
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"
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"
ASKER
I have also installed the MS Visual C++ redistributable.
Thanks
Thanks
Post the names you see in Dependency Walker.
Probably the redistributable package will solve it.
If you cannot, change the project settings.
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.
ASKER
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
#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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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