Buidling with link to source outside of Visual Studio


#1

So I’m building the example from this page https://www.bsframework.io/docs/build.html with linking from source on windows. But I’m using QtCreator as my IDE and building with VC 15. When I get to after project generation it says :
"

Your build files will be output to the build folder.

If you are using Visual Studio open up the build/myProject.sln solution and proceed building as normal
If you are using XCode open up the project in the build folder and proceed building as normal
If you are using Makefiles simply run make within the build folder

"
This forces me to use Visual Studio. Is there a way I can avoid using visual studio ?


#2

I haven’t used QtCreator myself, but it seems it can open CMake files directly: https://doc-snapshots.qt.io/qtcreator-4.0/creator-project-cmake.html. So I believe you should be able to just load CMakeLists.txt directly, without having to call cmake from the command line.


#3

Yes, that’s what I do. But until the building phase it works fine. the problem is that it generates a visual studio solution which have to be opened with visual studio. I’m thinking about just using visual studio for now. Say if I want to add a file to my project (either to bsf or to my part of the project) do I have to add the file and regenerate the whole project or do I just modify the solution generated by visual studio ?


#4

You need to register the file to the relevant CMake file and then regenerate the project. If you just add it to the solution and some CMake file changes, CMake will regenerate the project and you will lose your changes.

I’m sure you can use QtCreator to link directly with bsf binaries, but that solution is a hassle if you plan on modifying bsf often.


#5

May I ask which IDE do you use ? Does intellisens work or you just rely on your knowledge of c++? Also do you have a way to partly compile a piece of the project or does it all have to be recompiled all everytime ?


#6

I use Visual Studio when developing on Windows, and CLion on Linux & macOS. IntelliSense works as intended within Visual Studio.

Any time you change a file in the project only that file and dependent files will need to be recompiled. This should be handled automatically by your build system (e.g. Visual Studio) - in most cases only a file or two need to be recompiled.