zoukankan      html  css  js  c++  java
  • vscode cpp

    工程结构应该是这样的。
    
    └── foocpp
        ├── .vscode
        │   ├── launch.json
        │   └── tasks.json
        ├── README.md
        └── src
            ├── MainEntry.cpp
            ├── foo.cpp
            └── foo.h
    
    
    1 open the folder foocpp with vscode
    2 configure launch.json and tasks.json
    
    //======================================
            launch.json
    //======================================
    
    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "(lldb) Launch",
                "type": "cppdbg",
                "request": "launch",
                "program": "${workspaceFolder}/foobar.out",
                "args": [],
                "stopAtEntry": false,
                "cwd": "${workspaceFolder}",
                "environment": [],
                "externalConsole": false,
                "MIMode": "lldb",
                "preLaunchTask": "build foocpp",
            }
        ]
    }
    
    //======================================
            tasks.json
    //======================================
    {
        "version": "2.0.0",
        "tasks": [
            {
                "label": "build foocpp",
                "type": "shell",
                "command": "g++",
                "args": [
                    "-g","-std=c++14" ,"${workspaceRoot}/*/*.cpp", "-ofoobar.out"
                ],
                "group": {
                    "kind": "build",
                    "isDefault": true
                }
            }
        ]
    }
  • 相关阅读:
    get请求中文乱码问题
    JDBC
    SpringSecurity
    IDEA中创建项目
    Vue路由传参的几种方式
    vue-cli搭建与使用
    docker发布springboot项目
    css伪类的使用
    java实体类序列化与反序列化
    docker网络
  • 原文地址:https://www.cnblogs.com/Searchor/p/11205935.html
Copyright © 2011-2022 走看看