Page 1 of 1

Compile Precomp

Posted: Tue Jun 30, 2020 11:53 pm
by Chen.Cheng
Dear all:

I've recently been learning Precomp(v1.00.04) and trying to compile it with IVF. However, I'm having some difficulties with the compilation process and I'm considering two possible errors:

1.Precomp(v1.00.04)'s folder contains only three files( 'mods_precomp.f90' , 'PreComp.f' and 'SetProg.f90'),and is missing the necessary NWTC_library module. The oldest version I found from github is NWTC_library v1.05.00, but as mentioned in previous discussions(the links are as follows), compilation may require NWTC_library v1.04.01. I think this version is hard to find, is there anyone kind enough to provide resources on this module?

2.I'm not very familiar with the IVF compilation method. My approach is to compile the all files in one folder, The compilation process and prompted error messages are as follows:
1>Compiling with Intel(R) Visual Fortran Compiler XE [Intel(R) 64]...
1>PreComp.obj : error LNK2019: external symbol that cannot be parsed PICONSTS, which is referenced in the function MAIN__.
1>x64\Debug\c.exe : fatal error LNK1120: 1 unresolved external command
So I'm not sure the compilation process is correct.

That's the difficulties I'm having, and I'm hoping that someone kind will answer them.



Re: Compile Precomp

Posted: Wed Jul 01, 2020 7:21 am
by Jason.Jonkman
Dear Chen.Cheng,

Sorry, but I have no experience compiling PreComp and am not familiar with that error.

I've placed the older v1.04.01 of the NWTC Library here: ... sp=sharing. Does using that solve the problem?

Best regards,

Re: Compile Precomp

Posted: Mon Jul 06, 2020 8:18 pm
by Chen.Cheng
Dear Jason,

Thank you very much.After using the files in the link you provided, Precomp has compiled successfully.

The problem now is that when I run the exe file, it shows that several dll files are missing (libifcoremdd. dll, libifportMD.dll, libmmd.dll).

Maybe this problem is not related to Precomp's code. I'll try to debug it myself, and if I can't solve it, I'll come back for more advice!

Thanks again!


Re: Compile Precomp

Posted: Mon Jul 06, 2020 9:31 pm
by Bonnie.Jonkman
Those DLLs are necessary because you built with dynamic libraries instead of static ones.

With dynamic libraries, you have a few options:
  1. To run the code on the machine you compiled with, open the Intel compiler environment command window (this will be on your start menu, under something like "Intel Parallel Studio" "Compiler <version> for IA-32"), and run the code from that command window, or
  2. To run on any Windows machine, download and install the appropriate version of the Intel redistributable libraries here: ... rsion.html

Otherwise, try to build with static libraries (under "project properties", select "Configuration Properties"->"Fortran"->"Libraries", "Runtime Library", and choose "Multithreaded"). Then the executable won't depend on those dlls.

Re: Compile Precomp

Posted: Tue Jul 07, 2020 12:41 am
by Chen.Cheng
Dear Bonnie,

Thank you for your patient and professional guidance. I think my problem should be solved now.