Loading
LNK error when building lmflex running with x64 Native Tools Command Prompt Visual Studio 2019.
as per previous suggestion,
add libpthread.lib to the linker but how can I add this linker with Native tools command prompt?

   LINK /nologo /NODEFAULTLIB /OPT:NOREF /NXCOMPAT /DynamicBase /STACK:2097152 /guard:cf /subsystem:CONSOLE lmnewgen.obj rational_lmcode.obj lmgr.lib libcrvs.lib libsb.lib .\activation\lib\libnoact.lib libredir_std.lib legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib libvcruntime.lib libucrt.lib oldnames.lib kernel32.lib user32.lib netapi32.lib gdi32.lib comdlg32.lib comctl32.lib wsock32.lib shell32.lib Rpcrt4.lib oleaut32.lib Ole32.lib Wbemuuid.lib wintrust.lib crypt32.lib Ws2_32.lib iphlpapi.lib Psapi.lib advapi32.lib Shlwapi.lib dhcpcsvc.lib userenv.lib lmgr_dongle_stub.lib libcmt.lib libsimplifier.lib /out:rational_lmnewgen.exe

lmgr.lib(cmn_vm.obj) : error LNK2019: unresolved external symbol pthread_mutex_lock referenced in function wfDFlGGFHam46z3eIOsWPu

lmgr.lib(cmn_tpm.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_net.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_sock_impl.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_thread_impl.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(l_ssl.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(l_borrow_lock.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_thread.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(lm_init.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_s.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(l_diagnostics.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(fnp_errorlogger.obj) : error LNK2001: unresolved external symbol pthread_mutex_lock

lmgr.lib(cmn_vm.obj) : error LNK2019: unresolved external symbol pthread_mutex_unlock referenced in function wfDFlGGFHam46z3eIOsWPu

lmgr.lib(cmn_tpm.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_net.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_sock_impl.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_thread_impl.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(l_ssl.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(l_borrow_lock.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_thread.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(lm_init.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_s.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(l_diagnostics.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(fnp_errorlogger.obj) : error LNK2001: unresolved external symbol pthread_mutex_unlock

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_create referenced in function qMnTkIH5InkLJwhHYE

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_detach referenced in function gaTLJMiSeVWTJ6DdF5

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_equal referenced in function vodjdxVHIrzAkFo4Y

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_join referenced in function eqvFdHVugDqzt5SA

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_self referenced in function xVoFwcNX3qUQaiVy

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_key_create referenced in function c3d2lRsdd3U1YrUbcjfn1N

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_key_delete referenced in function tCI6_fcL3b95cwLyZdUix_

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_setspecific referenced in function m2sOdafSKzrTVx1p4Zk_thu

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_getspecific referenced in function hEWYoIdFX8BSeIF0A1Bfivs

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_mutex_timedlock referenced in function t1wJ0wldMHYEH_nGKC9U_vXzWAJ

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_mutex_trylock referenced in function qZwVByJ2PxBt27FekiHk4wrG1

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_cond_init referenced in function b8xx7euPXodSRrLOU_cgn

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_cond_wait referenced in function p6oossRDs3h4pvTFM0Ri3

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_cond_timedwait referenced in function ib1aFi2jieW74vEVjslLjjUTa0

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_cond_signal referenced in function pK_Bhy3IUc0LWvFcK9_qPKH

lmgr.lib(cmn_thread_impl.obj) : error LNK2019: unresolved external symbol pthread_cond_broadcast referenced in function kUfdHMpCYGqJzz1kaoYLML4Wht

rational_lmnewgen.exe : fatal error LNK1120: 18 unresolved externals

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\LINK.EXE"' : return code '0x460'

Stop.

 

How can I fix the problem?

Thanks.


  • Y Vernekar (Flexera Software)

    Hi,

    The LNK error are usually due to missing libs. I would request you to go through the section "Flexible API" from the development guide which will give you a list of libraries that needs to be included apart from the ones that I mentioned, also I hope you are using a supported Visual Studio version so do confirm that with the release notes of the respective FNP kit.

     

    For kits > 11.19:

    lm_new.obj

    lmgr_trl.lib

    libcrvs.lib

    libsb.lib

    activation\lib\libnoact.lib

    activation\lib\libact.lib

    libFNPload.lib

    lmgr_dongle.lib

    libredir_std.lib

    libcmt.lib

    libvcruntime.lib

    ucrt.lib

    legacy_stdio_wide_specifiers.lib

    legacy_stdio_definitions.lib

    oldnames.lib

    kernel32.lib

    user32.lib

    netapi32.lib

    gdi32.lib

    comdlg32.lib

    comctl32.lib

    wsock32.lib

    shell32.lib

    Rpcrt4.lib

    oleaut32.lib

    Ole32.lib

    Wbemuuid.lib

    wintrust.lib

    crypt32.lib

    Ws2_32.lib

    iphlpapi.lib

    Psapi.lib

    advapi32.lib

    Shlwapi.lib

    dhcpcsvc.lib

    userenv.lib

    libpthread.lib

    Expand Post
  • Thanks, but without Visual Studio, means with x64 Native Tools Command Prompt for VS 2019,

    with command nmake 64BIT=1 all, it throws above error so in this case where to add missing libs.

    • Y Vernekar (Flexera Software)

      Hi @ankitaibm​ ,

      To build the kit on Windows OS you need to use VS native tools command prompt.

Loading
LNK error when building lmflex running with x64 Native Tools Command Prompt Visual Studio 2019.
as per previous suggestion,
add libpthread.lib to the linker but how can I add this linker with Native tools command prompt?