Modern open source game engine

 
User avatar
Liddius
Topic Author
Posts: 3
Joined: Fri May 11, 2018 6:46 pm

How to set up a new project with bsf framework in visual studio 2017

Mon May 14, 2018 12:33 am

Hi,

I would want to set up a new project in visual studio 2017 with the bsf framework but I don't understand how to it (I always used code block before so visual is new for me).

I created a empty project, add the additionnal include and library c++ option, but the project doesn't recognize the includes from bsf, I tried to add the .dll but can't add them because I have to enable the clr option but can't find it. For now, I just modified an example file and it works but I would like a cleaner solution if possible.

Someone can help me please ?

Edit :

I found how to do it, I will explain for people who are new to visual studio like me (maybe there is another way to do it, I don't know).

1 - Create a new empty project in visual studio (mine is visual 2017)

2 - In your solution folder (where the .sln is), copy/paste the folders from bsf framework ("bin", "lib", "bsf") 

3 - In visual studio, right click on your project and click on propreties

4 - In "C/C++" tab, click on general tab

5 - Now, click on "other include directories" (you will have a small arrow on the right of the text box, click on it and click on "Edit")

6 - You will have a new pop up window, click in the blank area and click on the 3 small points

7 - Now, you have a browser window, you will have to find the folder "bsf" you copy/paste before, then add "bsf.dir", "bsfCore", "bsfEngine", "bsfUtility"

8 - Ok, now you have something like that in the text box

C:\path\project\Source\Game\bsf\Foundation\bsf.dir;C:\path\Desktop\project\Source\Game\bsf\Foundation\bsfCore;C:\path\Desktop\project\Source\Game\bsf\Foundation\bsfEngine;C:\path\Desktop\project\Source\Game\bsf\Foundation\bsfUtility;%(AdditionalIncludeDirectories)

9 - Now, click just under the "C/C++" tab, called "Linker" (or something like, I don't have the english visual studio)

10 - In Linker, click on General and then click on "Additional lib directories" or somethind like that, the ninth element

11 - Samething as step 6, 7, 8 except, you will have to go in your "lib" folder, find the x64/release folder

12 - You will have something like that

C:\path\project\Source\Game\lib\x64\Release;%(AdditionalLibraryDirectories)

13 - Next, under "General" always in Linker, click on "Input"

14 - Click on the first element "Additional dependencies" or something like that

15 - You will have a blank area without browser option

16 - Just write the following things in the blank area 

bsf.lib
bsfD3D11RenderAPI.lib
bsfFBXImporter.lib
bsfFontImporter.lib
bsfFreeImgImporter.lib
bsfOpenAudio.lib
bsfPhysX.lib
bsfRenderBeast.lib
bsfSL.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

17 - Now, copy/paste the dlls from your "bin/x64/Release" into the project folder (where is "name.vcxproj"), yes copy all the dlls just there with your code

18 - Now, it should work, you can test with copy/paste the example "LowLevelRendering" because it doesn't use assets etc.

I hope it helps, again, maybe there is another way but for me it worked.
 
User avatar
BearishSun
Banshee Developer
Posts: 96
Joined: Fri Sep 23, 2016 9:52 am

Re: How to set up a new project with bsf framework in visual studio 2017

Sun May 27, 2018 11:35 am

Thanks for the steps. I've since added a build guide: https://www.bsframework.io/docs/build.html which you can also use for setting up a project.

Also there is now a separate discussion board for the framework itself, at discourse.bsframework.io.

Who is online

Users browsing this forum: No registered users and 0 guests