I’m using the evaluation of the 32-bit PVF Workstation Complete, and I cannot get the compiler to give me static linking. Whenever I try to run a program compiled under PVF, both on my computer and another computer, I receive the error message:
“This application has failed to start because pg.dll was not found. Re-installing the application may fix this problem.”
I was able to correct the problem on my computer by setting environment variables which I would have expected PVF to set on installation. However, the pg.dll file is not on the other computer at all. Will I have to distribute pg.dll (and any other files that are needed) with the program on distribution, or is there a way to include it and other libraries statically?
And yes, I am aware of the advantages of dynamic linking, but there is only so much change at one time that my company is willing to go through. Simply switching compilers is enough for now, without having to change our distributions significantly.
In the 6.2 release of PVF (and the 6.2 release of any PGI compiler products on Windows), pg.dll is required to run programs compiled with PGI compilers. In addition, the Microsoft C runtime DLL msvcr80.dll is required.
If you run an application from outside of PVF, then you may set your PATH variable to include the path to the directory containing pg.dll, or put pg.dll in the same directory as your executable. Information on how Windows searches for a DLL can be found here.
If running an app from the command line, the PATH variable can be set for just that window. Otherwise, the PATH system variable can be modified globally using the Control Panel:System:Advanced tab.
As noted above, the Microsoft C runtime DLL msvcr80.dll is required to run executables built with PGI 6.2 compilers on Windows. In PVF Release 7.0, due in early 2007, PVF users will have the right to redistribute this DLL themselves. Until that time, you need to download the Microsoft 64-bit redistributables for 64-bit apps, and the 32-bit redistributables for 32-bit apps. Download and install the packages on the target system.
PGI Engineering is investigating how to eliminate these DLL dependencies, but it is unlikely that anything will change in this area in the 7.0 release.