Перейти к содержимому

Настройка разработки на С ++ с кодом Visual Studio в Windows 10 (код VS)

ProgrammingKnowledge

0:00 / 0:00

Настройка разработки на С ++ с кодом Visual Studio в Windows 10 (код VS)

1 134 296 просмотров · 8 лет назад
ProgrammingKnowledge
1,87 млн подписчиков
1 134 296 просмотров · 8 лет назад
В этом видео я собираюсь показать, как настроить разработку на С ++ с кодом Visual Studio в Windows 10. Мы будем использовать MinGW с VS-кодом в качестве нашего инструмента для компиляции и отладки. Итак, сначала я покажу, как установить mingw. Мы увидим, как создавать, создавать и компилировать нашу первую C ++-программу на VScode. С обновленным кодом VS вы можете сделать это следующим образом: Hit (Ctrl+P) and type: ext install cpptools Open a folder (Ctrl+K & Ctrl+O) and create a new file inside the folder with the extension .cpp (ex: main.cpp): Type in your code and hit save. Press (Ctrl+Shift+P and type, Configure task runner and then select other at the bottom of the list. { "version": "2.0.0", "tasks": [ { "label": "build hello world", "type": "shell", "command": "g++", "args": [ "-g", "helloworld.cpp" ], "group": { "kind": "build", "isDefault": true } } ] } Hit (Ctrl+Shift+B to run Build task. This will create the .obj and .exe files for the project. For debugging the project, Hit F5 and select C++(Windows). In launch.json file, edit the following line and save the file: Below is an example using the MinGW GDB debugger: { "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/a.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "C:\\mingw\\bin\\gdb.exe", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], "preLaunchTask": "build hello world" } ] } Hit F5. ---------------------Следить-------------------------- ------------------ Мой сайт - http://www.codebind.com Мой блог - https://goo.gl/Nd2pFn Моя страница в Facebook - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter -   / programmingknow   Pinterest - https://goo.gl/kCInUp Конвертер текстовых файлов - https://goo.gl/pVpcwL ------------------------ Материал, который я использую для создания видеороликов ------------------ Материал, который я использую для создания видео Windows - http://amzn.to/2zcXPyF Apple MacBook Pro - http://amzn.to/2BTJBZ7 Ноутбук Ubuntu - https://amzn.to/2GE4giY Рабочий стол - http://amzn.to/2zct252 Микрофон - http://amzn.to/2zcYbW1 ноутбук для ноутбука - http://amzn.to/2BVs4Q3 ----------------- Facebook Ссылки ----------------------------- ---------- http://fb.me/ProgrammingKnowledgeLear... http://fb.me/AndroidTutorialsForBegin... http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter ------------------ Онлайн-курсы для изучения -------------------------- - Java - https://bit.ly/2H6wqXk C ++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C-https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Современное решение с Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z