Student: problem switching from VSCode to Clion - Need a project extension to work
Hi, I am a student looking to switch from VScode to Clion after having written in both Pycharm ant Intellij (Python class and java respectively). However, to start programming in Clion I need to be able to compile my code with a specific set of .h files for our class.
Our professor has made a Toolset extension for VScode with all the packages and the corresponding Make file to compile the code we write in our course (TDT4102 Tools). Any tips for getting Clion to run these packages. More specific: do I need to make a custom Make file and or Cmak file?
请先登录再写评论。
I would recommend starting to look at CMake and how it works. CMake lets you define the "structure" of your project in a way that it will be decoupled from your environment. So you will be able to build it on Windows, Linux, OSX, etc...
In fact, once you leave University and get a C++ programming job somewhere, and given that the place you will work at does things properly according to the standards, you will most likely use CMake.
I posted an article recently giving a brief introduction to CMake and what it does. Feel free to ask me more questions in that article.
Coming back to your question, without looking at this Toolset extension script, I won't be able to tell you how to translate your build environment to a CMake build environment. If you cannot post it here, post the following information:
Basically, please describe your full project and what is inside it. As well as anything it uses outside that.
And yes: you will have to write a CMakeLists.txt file for it if you want to use CLion. It is the only way to get CLion to compile/debug your project.