Forum

RE: Fatal error LNK1181 while compiling

Juilo Leva Lopez, modified 7 Years ago.

Fatal error LNK1181 while compiling

Youngling Posts: 2 Join Date: 11/7/16 Recent Posts
Hi there,

I have been trying to compile the latest tag but after a while MVS gives me the following error:
[indent]LINK : fatal error LNK1181: cannot open input file 'libifcoremt.lib'[/indent]
and then crashes. I have attached the whole output log in case it helps

I am using MVS community 2015 and Intel Parallel Studio XE 2018. But the python script to prepare the code for MVS does not give me the option of IFORT18. Could that be the problem at all?

Thanks for any help!
thumbnail
Adri Mourits, modified 7 Years ago.

RE: Fatal error LNK1181 while compiling

Padawan Posts: 97 Join Date: 1/3/11 Recent Posts
Hi Juilo,

Yes, I expect that prepare_sln.py without IFORT18 causes this problem.

What happens if you use the prepare_sln.py from the trunk (that does contain IFORT18 preparation):
https://svn.oss.deltares.nl/repos/delft3d/trunk/src/prepare_sln.py
You can just copy it into your compiling directory.

Regards,

Adri
Juilo Leva Lopez, modified 7 Years ago.

RE: Fatal error LNK1181 while compiling

Youngling Posts: 2 Join Date: 11/7/16 Recent Posts

I have actually uninstalled IFORT18 and installed IFORT16, tried again and got the same error at the same point. 

(The new prepare_sln.py for IFORT18 would give me a traceback)

thumbnail
Adri Mourits, modified 7 Years ago.

RE: Fatal error LNK1181 while compiling

Padawan Posts: 97 Join Date: 1/3/11 Recent Posts

Hi Juilo,

When the C compiler is used for linking, an explicit reference must be added to the Fortran compiler libraries. This is done by adding the line:

$(IFORT_COMPILER13)\compiler\lib\intel64

to "Additional Library Directories", where IFORT_COMPILER13 is replaced by IFORT_COMPILER16 when executing prepare_sln.py, and the reference is resolved by VisualStudio, normally into something like: "c:\Program Files (x86)\Intel\Composer XE 2013"


It seems that the Ifort installation on your machine is somewhere else. Can you check where it is installed? Can you check whether IFORT_COMPILER16 is resolved correctly on your system as follows:

Windows Start button ->  All programs -> Intel Parallel Studio -> Command Prompt -> open a Command box.
In the Command box, execute: set
This will show the environment parameters, including IFORT_COMPILER16

Regards,

Adri