Runtime error on startup of executable (Windows 64bit AMD64)

Hello,

we are trying to compile our product on Windows Server 2003 64bit with the current 64bit PGI Workstation (version 7.0-4).

The compilation consists of FORTRAN77, FORTRAN90 and C/C++ files. For all FORTRAN resources we use th PGI compilers (pgf77 or pgf90 respectively) and do a compile only (-c command line switch). The C/C++ will be compiled using the C-compiler from the microsoft Visual Studio 2005. Linking then is also done with the micorsoft linker tool. (This cannot be changed as the complete compilation is part of some huge automated process…)

When doing this and adding the appropriate lib-files to the linker option (i.e. currently we use: pgf90.lib pgc.lib pgf90rtl.lib pgftnrtl.lib pg.lib) then compilation and linking succeeds and the executable file is being created.

But then when trying to run the executable, we get the following error:

The application failed to initialize properly. 0x80000003

And then the application terminates immediately.
All required PGI DLLs are in the phath and also the VCREDIST package has been installed (despite the complete Visual Studio 2005 is already installed on this system).
Thus all required DLLs shall be found. (I.e. “depends.exe” does not show any missing DLLs.)


When using the exact same compilation steps and files and only using the old PGI Workstation version (version 6.1-2) then everything works! And the executable does NOT crash!

We are looking forward to any kind of support or hints on how to solve this.


Best regards
Frank Illenseer

I found some solution:

Obviously I was missing the application manifest file in the final installation folder for the application. This caused the exe to not being able to locate the correct version of the “msvcr80.dll”.

Some helpful websites are listed below:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=15218&SiteID=1
http://msdn2.microsoft.com/en-us/library/bxf4ee9f(vs.80,de-de).aspx

http://mcblogs.craalse.de/sku?m=20060523

Hi Frank,

Thanks you for the information! Note you may want to investigate using the “mt.exe” tool after your link step which will embed the manifest file information into your exe.

  • Mat