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

LNK error when building lmflex in Visual Studio 2019

Jump to solution

I've tried to follow the steps in the following link to build the lmflex.c for File-Based licensing

https://community.flexera.com/t5/FlexNet-Publisher-Knowledge-Base/How-to-build-lmflex-with-Visual-Studio-2015-for-certificate/ta-p/113282

 

The problem is that I keep getting LNK errors :

Error LNK2001 unresolved external symbol pthread_mutex_lock lmflex lmgr_trl.lib(cmn_sock_impl.obj)

Error LNK2001 unresolved external symbol pthread_mutex_unlock lmflex lmgr_trl.lib(l_ssl.obj)

Error LNK2019 unresolved external symbol pthread_create referenced in function sJXEOZcr07C43XvNF9h lmflex lmgr_trl.lib(cmn_thread_impl.obj)

And so many others.

How can I fix the problem?

Thanks.

0 Kudos
(1) Solution

@eskandarih Thanks for your confirmation, yes, this is the list for FNP 11.19.0 just to keep it handy for other user if they want. 

lm_new.obj

lmgr_trl.lib

libcrvs.lib

libsb.lib

activation\lib\libnoact.lib

lmgr_dongle.lib

libredir_std.lib

libcmt.lib

libvcruntime.lib

libucrt.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

Best Regards,

Mani. 

View solution in original post

(4) Replies
mrathinam
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @eskandarih what is the FNP version which you are using to build lmflex in Visual Studio 2019?.

Best Regards,

0 Kudos

I'm using FNP 2022 R1 (11.19.0)

0 Kudos

I forgot to add libpthread.lib to the linker.

The problem is fixed.

0 Kudos

@eskandarih Thanks for your confirmation, yes, this is the list for FNP 11.19.0 just to keep it handy for other user if they want. 

lm_new.obj

lmgr_trl.lib

libcrvs.lib

libsb.lib

activation\lib\libnoact.lib

lmgr_dongle.lib

libredir_std.lib

libcmt.lib

libvcruntime.lib

libucrt.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

Best Regards,

Mani.