About .lib

The engine.
Post Reply
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

About .lib

Post by Gary »

Hello:
This is not a lack of a“.lib” file, every time I run “Hello word”, there will be the following error:error LNK2019: 无法解析的外部符号 "unsigned char * DSL_LIC2" (?DSL_LIC2@@3PAEA),该符号在函数 "private: double __cdecl `anonymous namespace'::da83e1ddc::_(double (__cdecl A0x93435f6e::da83e1ddc::*)(void))" (?_@da83e1ddc@?A0x93435f6e@@AEAANP812@EAANXZ@Z) 中被引用.
But I've added smile.lib as required!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

You can't link the program because you didn't include your personalized license file - see this thread for more detail:
http://support.bayesfusion.com/forum/vi ... f=2&t=4537
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I'm sorry, how to link the personalized license file. #include it? I tried, but useless! I put the license file into the smile.lib file, and useless. I don't know how to make it.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I followed this operation, but useless.
1. Go to Project Settings | Linker | General and add SMILE directory to ‘Additional
Library Directories’, or
2. Go to Project Settings | VC++ Directories and add SMILE directory to ‘Library
Directories’.
There are also two independent ways of specifying the SMILE include directory:
1. Go to Project Settings | C++ | General and add SMILE directory to ‘Additional
Include Directories’, or
2. Go to Project Settings | VC++ Directories and add SMILE directory to ‘Include
Directories’.
Starting with version 1.2.0 released in November 2017, SMILE no longer requires
_SECURE_SCL=0 to be defined in preprocessor settings.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

The part of SMILE manual you have quoted is related to the location of the .lib file.

The problem you're experiencing is caused by the lack of DSL_LIC1 and DSL_LIC2 variables. These are defined in your personalized license file, which you can obtain from our website. For more information, see the "Licensing" section in SMILE manual.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I'm sorry , I have the personalized license file,but,how, how to use it ?!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

As described in SMILE manual, you need to include the smile_license.h file in one of your source files.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I did that. I put it in the smile library file. But useless!.Then there is the above problem.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

I put it in the smile library file.
You don't need to copy the smile_license.h to "smile library file". Treat is as one of your project files and #include it exactly once in some of your C++ source files.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I'm very sorry. I can't understand " Treat is as one of your project files".And,there is not the"#include <smile_license.h> " in "hello word" tutorial.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

Here's the direct quote from the SMILE manual:
The licensing system is implemented as two variables (DSL_LIC1 and DSL_LIC2), which must be declared and initialized in order to successfully link your program with SMILE. The definitions for these variables are included in your license header file (usually smile_license.h). This file is not included in SMILE distribution, it is personalized by BayesFusion, LLC, for you or your organization. 6-month academic and 30-day evaluation licenses can be obtained directly at https://download.bayesfusion.com.
6-month academic license should be sufficient for most coursework. If you need SMILE Academic for a research project and would like a longer license, please email us at support@bayesfusion.com from your university email account.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

I'm so sorry. I've seen it,but it does not say how to set it up. Can you tell me how to do this? Specific operation?!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

  • 1. go to SMILE download website
    2. log in
    3. click on the 'Click here to obtain your SMILE license' link
    4. fill in the form, then click OK
    5. you'll get the zip file
    6. extract the smile_license.h file from the zip
    7. #include the smile_license.h in one of your source files.
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Post by Gary »

"7. #include the smile_license.h in one of your source files." This is where I do not understand!I have done 1-6. Can you tell me how to do the "7"? Specific operation?!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Post by shooltz[BayesFusion] »

7. #include the smile_license.h in one of your source files." This is where I do not understand
Try adding the following line in your code:

Code: Select all

#include "smile_license.h"
Post Reply