Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Help with application failed to initialize properly (0xc0000142)

jmshort17
Beginner
2,373 Views
I recently updated my intel fortran compiler from 10.1.013 to 10.1.021. The install and MS visual studios 2005 integration occurred with no problems. I am able to compile and build from command prompt and MS VS. However, when I try to run the exe file, I get the following error:

application failed to initialize properly (0xc0000142)

I am not sure where to start solving this problem.

Thanks
J
0 Kudos
8 Replies
Steven_L_Intel1
Employee
2,373 Views
Most of the time this is a DLL mismatch problem. Download Dependency Walker and use it to analyse your EXE and see what it says.

Check your PATH environment variable and see if it contains the path to the 10.1.021 LIB folder.
0 Kudos
jmshort17
Beginner
2,373 Views
The PATH contains 10.1.021 LIB folder, so it doesn't look like an easy fix. I did the dependency walker and the error seems to be coming from one dll, namely DWMAPI.DLL. I looked online, and it seems that this dll is for vista, and the problem is arising from IE7 (I got this information from a msdn forum online). I was hoping to confirm this with the higher ups (that is you) before I begin replacing IE7 with IE6 to fix the problem. Has anyone run across this error before?

Thanks,
J
0 Kudos
Steven_L_Intel1
Employee
2,373 Views
I doubt DWMAPI.DLL is really the problem. Sometimes Dependency Walker will report an error with a system DLL that is a dependency of some other DLL and it's not really an issue for your program.

Here's a question - is the first 10.1.021 LIB folder the IA32 folder? If you got the "Intel64" (or is it still called EM64T?) folder in there first, you could have this problem. PATH should have only the IA32 folder if you're on a 32-bit system.
0 Kudos
jmshort17
Beginner
2,373 Views
I have 

C:Program FilesIntelCompilerFortran10.1.021IA32Lib

in the LIB and PATH in the environmental variables and
I have the path in the options for VS 2005 under executables, libraries, and include.

I don't have any path for EM64Tlib set in either place.

program still fails to initialize when I try to run after compile and build.

J
0 Kudos
Steven_L_Intel1
Employee
2,373 Views
Can you build a "Hello World" program that has the same problem? How do you start the program - from the command line or by double-clicking? If the latter, will it start from the command line?

Try this. Open a command prompt window (Start > Run. Type CMD and click OK. Change the default directory (use the CD command) to the folder with your program. Now type this:

set path=
yourprogram.exe

(where "yourprogram.exe" is the name of your program). What happens?
0 Kudos
jmshort17
Beginner
2,373 Views
Hello world program compiles, builds and runs in MS VS 2005.

I run the program from MS VS 2005 from the debug menu after I compile and build. I also tried to run it from the command prompt and it gave me the same error.

I ran the command prompt

set path = myprogram.exe

Nothing printed to the command prompt screen. I then tried to run the program and it gave me the following (NEW!) error, which I think will be more helpful:

application has failed to start because imsl_dll.dll was not found. Re-installing the application may fix the problem.

What next?

Thanks,
J
0 Kudos
jmshort17
Beginner
2,373 Views
UPDATE:

I did some comparisons with the environmental variables set on the system which was not working against a system where the program was working on. There were some differences, mostly in the order of the paths, but I made them look as close to one another as possible (i.e. there were some additional paths on one system that were not on the other). For the paths that were the same, I made sure that the order they were in was the same as the system where the program was working. In addition, I moved the path

C:Program FilesMicrosoft Platform SDKLib.

which was under LIB to the end. (not sure if that mattters?)

I am not too familiar with how the environmental variables work exactly (i.e. I don't know what sort of "thing" they are sensative to), but the program seems to be working now. I can compile, build and run in the command prompt and in MS VS 2005. However, there is one catch: There is a dll file, mspdb80.dll, which seems to be giving me a problem. The dll file is in the folder

C:Program FilesMicrosoft Visual Studio 8VCin

Now, if I compile and build from VS there is an error which says the dll file is an old version and VS won't build. I rename the file mspd80.dll.save and then compile and build in VS, then things work fine. If I compile,build and run in command prompt, then it gives me an error: link.exe (this is in the folder C:Program FilesMicrosoft Visual Studio 8VCin) cannot find mspdb80.dll (since I renamed it mspdb80.dll.save), however, the program does seem to run even after the error message. Is this a serious problem? It is a bit inconvienent to have to rename this file everytime I want to compile in VS or in command prompt.

Thank you for all your help and direction.
J


0 Kudos
Steven_L_Intel1
Employee
2,373 Views
First, you misunderstood my suggestion for the "set pat=" command. I meant that to be the entire command, not with your EXE added to it. However, it didn't really change the test. Your program uses the IMSL DLLs. What IMSL folders are in your PATH environment variable?

The LIB environment variable is not relevant here.

The issue with MSPDB80.DLL is a problem in VS2005 before SP1. That DLL should be in the Program FilesMicrosoft Visual StudioCommon7IDE folder. If you have not installed SP1 for VS2005, I recommend doing so.
0 Kudos
Reply