This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- Re: Need C and C++ example
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 09, 2012
04:21 AM
Need C and C++ example
Hello,
I'm an absolute newbe working with FlexnetPublisher. So, my question is probably silly. Please answer it anyway (if possible).
After successfull compilation of the toolkit, I looked around for an example, how to code (C and C++) the license request.
I only want to send a string with the feature name and get back the license=OK (if available)
Where are the subroutine calls described?
Which libraries from the toolkit will be needed?
Thanks for any help
I'm an absolute newbe working with FlexnetPublisher. So, my question is probably silly. Please answer it anyway (if possible).
After successfull compilation of the toolkit, I looked around for an example, how to code (C and C++) the license request.
I only want to send a string with the feature name and get back the license=OK (if available)
Where are the subroutine calls described?
Which libraries from the toolkit will be needed?
Thanks for any help
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 09, 2012
09:08 AM
The machind directory of the FlexNet Publisher toolkit contains lmflex.c, probably the simplest example of performing a license checkout. The examples directory contains additional examples, and the C/C++ function reference begins with typical sequences of function calls.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2013
06:32 AM
Hello,
I am just getting started with flexera, and reading trough documentation
when i want to compile lmflex.c example i got the fallowing errors
Thank you for any info or hints
I am just getting started with flexera, and reading trough documentation
when i want to compile lmflex.c example i got the fallowing errors
Thank you for any info or hints
c:\flexlm>cl lmFlex.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
lmFlex.c
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:lmFlex.exe
lmFlex.obj
lmFlex.obj : error LNK2019: unresolved external symbol _lc_free_job referenced i
n function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_checkin referenced in
function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_checkout referenced i
n function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_set_attr referenced i
n function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_get_errno referenced
in function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_perror referenced in
function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_new_job referenced in
function _main
lmFlex.obj : error LNK2019: unresolved external symbol _l_n36_buf referenced in
function _main
lmFlex.obj : error LNK2019: unresolved external symbol _lc_flexinit referenced i
n function _init
lmFlex.obj : error LNK2019: unresolved external symbol _lc_flexinit_property_han
dle_set referenced in function _init
lmFlex.obj : error LNK2019: unresolved external symbol _lc_flexinit_property_han
dle_create referenced in function _init
lmFlex.obj : error LNK2019: unresolved external symbol _lc_flexinit_property_han
dle_free referenced in function _cleanup
lmFlex.obj : error LNK2019: unresolved external symbol _lc_flexinit_cleanup refe
renced in function _cleanup
lmFlex.exe : fatal error LNK1120: 13 unresolved externals
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2013
11:20 AM
Please see makefile or makefile.act in the platform directory (such as i86_n3) of your FNP toolkit. The lmflex.exe target shows the .lib and other files that need to be linked in. The FNP Development Environment Guide fnp_devenv.pdf also shows a list of required libraries.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 10, 2013
11:11 AM
Hi,
in my case i can see only x64_n6 platform directory in file 11.11.0.2 FlexNet Publisher Windows x86-64 file (that actually need to be x64), while in fnp_devenv.pdf under Setting Up Microsoft Visual Studio
for a FlexEnabled Application only setup for i86_n3. Is there an additional documentation covering x64 platform?
if i set x64_n6 instead i86_n3
C:/flexlm/x64_n6
C:/flexlm/x64_n6/activation/lib
i got errors like, unresolved external symbol l_n36_buf
EDIT:
i got the correct set of libs from from output of command line example
lm_new.obj lmgr.lib libsb.lib libcrvs.lib oldnames.lib kernel32.lib user32.lib netapi32.lib advapi32.lib gdi32.lib comdlg32.lib comctl32.lib wsock32.lib Rpcrt4.lib oleaut32.lib Ole32.lib Wbemuuid.lib wintrust.lib crypt32.lib libcmt.lib lmgr_dongle_stub.lib .\activation\lib\libnoact.lib
in my case i can see only x64_n6 platform directory in file 11.11.0.2 FlexNet Publisher Windows x86-64 file (that actually need to be x64), while in fnp_devenv.pdf under Setting Up Microsoft Visual Studio
for a FlexEnabled Application only setup for i86_n3. Is there an additional documentation covering x64 platform?
if i set x64_n6 instead i86_n3
C:/flexlm/x64_n6
C:/flexlm/x64_n6/activation/lib
i got errors like, unresolved external symbol l_n36_buf
EDIT:
i got the correct set of libs from from output of command line example
lm_new.obj lmgr.lib libsb.lib libcrvs.lib oldnames.lib kernel32.lib user32.lib netapi32.lib advapi32.lib gdi32.lib comdlg32.lib comctl32.lib wsock32.lib Rpcrt4.lib oleaut32.lib Ole32.lib Wbemuuid.lib wintrust.lib crypt32.lib libcmt.lib lmgr_dongle_stub.lib .\activation\lib\libnoact.lib
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 12, 2013
11:05 AM
Hello,
i am searching for a way to convert string to LM_A_VAL_TYPE, can anyone assist me with an example?
what i want to accomplish is to set TST_LICPATH from a string.
(void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE) TST_LICPATH);
Thank you
i am searching for a way to convert string to LM_A_VAL_TYPE, can anyone assist me with an example?
what i want to accomplish is to set TST_LICPATH from a string.
(void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE) TST_LICPATH);
Thank you
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 12, 2013
04:44 PM
Casting the string to LM_A_VAL_TYPE as you've done, and as done in the lmflex.c example, should do what you want.