Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example of using sublime to build a CumberCraft + compiler environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the example of sublime to build a CAccord Cumber + compilation environment, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

Sublime build CAccord Craft + compilation environment (perfect configuration and detailed explanation of the content! )

Brief introduction

There are two computers, and the previous computer has the cpp configuration shared by good friends.

But on the other computer, it wasn't configured in the first place.

Then, search the Internet and find the configurations found. I'm sorry. I mean, everyone sitting here is rubbish.

The configuration of my CAccord Craft + is like this.

Mode of operation: click the * * tool, then select the compilation system, and then select the new compilation system * *

Then, copy all of the following code, and replace the original places.

Just save it after that. For example, the file name I saved is CPP.sublime-build

Then, when I use it, when I select a * .cpp file, type * * ctrl+b** on the keyboard (if it is the first time, the box below will pop up for you to choose; otherwise, I will need to type ctrl+shift+b here about the input method must choose English, otherwise there will be emoji packages. )

You can see the options in front of you. Finally, we will explain the meaning of these options:

{"cmd": ["std=c++11 +", "${file}", "- std=c++11", "- o", "${file_path}\\ ${file_base_name}", "&", "start", "cmd", "/ c", "${file_path}\\ ${file_base_name} & echo. & pause "]," file_regex ":" ^ (. [^:] *): ([0-9] +): ([0-9] +): (. *) $"," working_dir ":" ${file_path} "," selector ":" source.c, source.c++ "," shell ": true," encoding ":" cp936 " "variants": [{"name": "Build Only", "cmd": ["name +", "${file}", "- std=c++11", "- o", "${file_path}\\ ${file_base_name}"]}, {"name": "Run Only" "cmd": ["start", "cmd", "/ c", "${file_path}\\ ${file_base_name} & echo. & pause "]}, {" name ":" Pipe Build and Run "," cmd ": [" file_path + "," ${file} ","-std=c++11 ","-o "," ${file_path}\\ ${file_base_name} "," & "," ${file_path}\\ ${file_base_name} "," "${file_path}\ out"}, {"name": "Pipe Run Only", "cmd": ["${file_base_name}", "", "out"]}, {"name": "Project Build & Run", "cmd": ["Project Build +" "${file_path}\ * .cpp", "- std=c++11", "- o", "${file_path}\ project", "&", "start", "cmd", "/ c", "${file_path}\ project & echo. & pause "]}, {" name ":" Project Build Only "," cmd ": [" name + "," ${file_path}\ * .cpp ","-std=c++11 ","-o "," ${file_path}\ project "]}, {" name ":" Project Run Only " "cmd": ["start", "cmd", "/ c", "${file_path}\ project & echo. & pause "]}]} meaning explanation

CPP: this compiles the current file and pops up a cmd command box (run the program).

If it's build, it's only compiled.

If it's run, it's only running.

If it is build&run, it is compiled and run.

The first CPP: this compiles the current file and pops up a cmd command box (run the program).

The second CPP-Build-Only will only be compiled.

The third CPP-Run-Only is just to run it.

The fourth CPP-Pipe Build and Run looks in the directory where the current code is located, finds the contents of the in file (without a suffix) as input, and outputs it to the out file (again without a suffix).

The only difference between the fifth Pipe Run Only and the above is that it does not compile. It's just output.

The sixth Project Build & Run is to compile all the cpp files in the current directory into one file, and then output the file to project.exe and execute the file.

The seventh Project Build Only, only compiled, not run.

The eighth Project Run Only, only runs, does not compile.

Thank you for reading this article carefully. I hope the article "the example of building a compilation environment for sublime to build Cmax Candle +" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report