About .lib

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

About .lib

Postby Gary » Tue Jan 09, 2018 2:39 am

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
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Tue Jan 09, 2018 1:18 pm

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/viewtopic.php?f=2&t=4537

Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: About .lib

Postby Gary » Mon Jan 15, 2018 3:35 am

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

Postby Gary » Mon Jan 15, 2018 3:40 am

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
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Mon Jan 15, 2018 1:03 pm

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

Postby Gary » Tue Jan 16, 2018 11:45 am

I'm sorry , I have the personalized license file,but,how, how to use it ?!

shooltz
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Tue Jan 16, 2018 1:53 pm

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

Postby Gary » Wed Jan 17, 2018 11:43 am

I did that. I put it in the smile library file. But useless!.Then there is the above problem.

shooltz
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Wed Jan 17, 2018 1:16 pm

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

Postby Gary » Thu Jan 18, 2018 1:43 am

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
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Thu Jan 18, 2018 2:16 pm

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

Postby Gary » Sun Jan 28, 2018 1:49 pm

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
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Mon Jan 29, 2018 12:28 pm

    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

Postby Gary » Thu Feb 01, 2018 3:22 am

"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
Site Admin
Posts: 1104
Joined: Mon Nov 26, 2007 5:51 pm

Re: About .lib

Postby shooltz » Thu Feb 01, 2018 1:42 pm

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"


Return to “SMILE”