Using SMILE with Visual Studio 2015 C++

The engine.
Post Reply
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

There are some hard to find configurations I had to do to get SMILE to work with Visual Studio C++.

Here are the instructions I followed.

First, download SMILE for Visual Studio 2015; the 64 bit version. Here's the download page: https://download.bayesfusion.com/files. ... ness#SMILE
SMILE 64 Bit.JPG
SMILE 64 Bit.JPG (14.4 KiB) Viewed 252085 times
That link points to a ZIP file. Unzip the files into a folder in the Visual Studio folder. (These files can go anywhere.)
Visual Studio Folders.JPG
Visual Studio Folders.JPG (15.34 KiB) Viewed 252085 times
Create a new project in Visual Studio.
Visual Studio New Project.JPG
Visual Studio New Project.JPG (53.56 KiB) Viewed 252085 times
Last edited by jdtoellner on Sun Nov 27, 2016 5:10 pm, edited 2 times in total.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

In the Solution Explorer window right-click on SMILE Sample Application (or whatever you named your application).
Visual Studio Solution Explorer.JPG
Visual Studio Solution Explorer.JPG (29.79 KiB) Viewed 252080 times
Select Properties.
Visual Studio Solution Explorer Properties.png
Visual Studio Solution Explorer Properties.png (18.98 KiB) Viewed 252080 times
On the properties page select VC++ Directories.
Visual Studio Properties VC Directories.JPG
Visual Studio Properties VC Directories.JPG (75.08 KiB) Viewed 252080 times
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

Click on the field next to Include Directories and select <Edit...>.
Visual Studio Include Directories.png
Visual Studio Include Directories.png (26.05 KiB) Viewed 252080 times
Click on the Folder icon in this window.
Visual Studio Include Directories Folder Selector.JPG
Visual Studio Include Directories Folder Selector.JPG (31.91 KiB) Viewed 252080 times
Then click on the ellipses (...).
Visual Studio Include Directories Folder Selector 2.JPG
Visual Studio Include Directories Folder Selector 2.JPG (31.2 KiB) Viewed 252080 times
Last edited by jdtoellner on Sun Nov 27, 2016 5:12 pm, edited 2 times in total.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

From here you'll navigate to the SMILE folder you unzipped.
Visual Studio Include Directories Folder Selector 3.JPG
Visual Studio Include Directories Folder Selector 3.JPG (57.95 KiB) Viewed 252080 times
Select the SMILE folder you created from the ZIP file.
Visual Studio Select SMILE Folder.JPG
Visual Studio Select SMILE Folder.JPG (48.58 KiB) Viewed 252080 times
Click OK here.
Visual Studio Include Directories Folder Selector 4.JPG
Visual Studio Include Directories Folder Selector 4.JPG (34.59 KiB) Viewed 252080 times
Last edited by jdtoellner on Sun Nov 27, 2016 5:13 pm, edited 2 times in total.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

You'll need to do the same for Library Directories.
Visual Studio Properties VC Directories Library.JPG
Visual Studio Properties VC Directories Library.JPG (78.35 KiB) Viewed 252080 times
Follow the same instructions you did for the Include folder.

When you're done with that click OK here.
Visual Studio Properties VC Directories OK.JPG
Visual Studio Properties VC Directories OK.JPG (68.32 KiB) Viewed 252080 times
You can now #include smile.h in your code.
Visual Studio Include SMILE.JPG
Visual Studio Include SMILE.JPG (26.04 KiB) Viewed 252080 times
Gary
Posts: 40
Joined: Thu Nov 17, 2016 2:38 am

Re: Using SMILE with Visual Studio 2015 C++

Post by Gary »

I use the Chinese version of VS2010, the same way?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by shooltz[BayesFusion] »

Jon,

Thanks for writting this info down. To build up on this, let me add that there's an alternative way of specifying the include and library directories:

1. for include directories, go to Project Settings, C/C++, General and set 'Additional Include Directories'.
2. for library directories, go to Project Settings, Linker, General and set 'Additional Library Directories'.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

For some reason this stopped working. I can't get VS to find include files. I'm having to resort to putting them in the project code folder.

VS works fine for projects I've already created. It stopped working for new projects.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by shooltz[BayesFusion] »

Did you try to use the 'Additional Include Directories' option in C/C++|General settings?
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

Yes. I tried this both ways: in VC++ Directories and in C/C++ General.

I'll chalk this up to either a Visual Studio bug or in my inability to use Visual Studio. It's not holding me up. It's just inconvenient.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by shooltz[BayesFusion] »

Maybe it's an issue with OneDrive (your screenshots had directories there).
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: Using SMILE with Visual Studio 2015 C++

Post by jdtoellner »

I figured out the problem. There's a Configuration option on the Property page. I had inadvertently selected Release and should have selected Degub.
Capture.JPG
Capture.JPG (25.44 KiB) Viewed 251536 times
Post Reply