cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error LNK2001

Error LNK2001

Error LNK2001 can be seen during multiple occasions ,one of them is stated below

 

lmgr_trl.lib(cmn_vm_FakeVMDetection.obj) : error LNK2019: ссылка на неразрешенный внешний символ fclose в функции tb2QUQ4AsjyG4
lmgr_trl.lib(l_lfgets.obj) : error LNK2001: неразрешенный внешний символ "fclose"
lmgr_trl.lib(flex_file.obj) : error LNK2001: неразрешенный внешний символ "fclose"
lmgr_trl.lib(fnp_errorlogger.obj) : error LNK2001: неразрешенный внешний символ "fclose"
lmgr_trl.lib(l_read_lfile.obj) : error LNK2001: неразрешенный внешний символ "fclose"
lmnewgen.obj : error LNK2001: неразрешенный внешний символ "fclose"

 

These errors can be encountered while building the FNP Kit and running the nmake -f makefile command.

Reason

 The Visual Studio in question is installed in a language different from English (Russian) whereas  a part of the code in the makefile checks for the Visual Studio Version.

The string returned by the VS is in Russian whereas the makefile  is expecting it to be in English and hence these errors are encountered since it starts using older libraries leading to failure

Resolution
1.Search the makefile for the below code
 
!if ([cl 2>&1 | findstr /C:"Version 19"> nul] == 0)
COMPILER = 19.00
!endif

 2.Comment out the If statement in the code.

#!if ([cl 2>&1 | findstr /C:"Version 19"> nul] == 0)
COMPILER = 19.00
#!endif
Commenting the if statement around the compiler version forces the makefile to use the newer libraries.
 
Note: Only perform this workaround if you are using Visual Studio 2017 or higher
 
 
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Mar 16, 2021 04:09 AM
Updated by:
Contributors