ubuntu下vscode的使用教程_vscode连接ubuntu虚拟机

ubuntu下vscode的使用教程_vscode连接ubuntu虚拟机1、安装ffmpegwgethttps://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2tar-xjvfffmpeg-4.1.tar.bz2./configure–prefix=/usr/local/ffmpeg–enable-gpl–enable-version3–enable-nonfree–enable-postproc–enable-pthreads–enable-libfdk-aac–enable-libmp3lame

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

1、安装ffmpeg

wget https://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2
tar -xjvf ffmpeg-4.1.tar.bz2
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfdk-aac --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-libvorbis --enable-shared --enable-avfilter

ubuntu下vscode的使用教程_vscode连接ubuntu虚拟机

 

2、

项目根目录下编写CMakeLists.txt文件

ubuntu下vscode的使用教程_vscode连接ubuntu虚拟机

# Minimum CMake required                                                                         
cmake_minimum_required(VERSION 3.14.0)

project(demo)

set(CMAKE_BUILD_TYPE "Debug")
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

set(EXTRA_CXX_FLAGS "-std=c++11 -Wall -Wno-unused-function -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
message("-- CMAKE_CXX_COMPILER_VERSION: " ${CMAKE_CXX_COMPILER_VERSION})

include_directories(/usr/local/ffmpeg/include)
link_directories(/usr/local/ffmpeg/lib)

add_executable(main demo.cpp)
target_link_libraries(main
    -Wl,--start-group
    avcodec
    avdevice
    avfilter
    avformat
    avutil
    postproc
    swresample
    swscale
    -Wl,--end-group
    pthread)

3、再build文件夹下执行

cmake ..
make

4、配置vscode文件

ubuntu下vscode的使用教程_vscode连接ubuntu虚拟机

编辑c_cpp_properties.json文件

添加 “/usr/local/ffmpeg/include” 到 “includePath”

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "/usr/local/ffmpeg/include"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu11",
            "cppStandard": "gnu++98",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

 编辑launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceRoot}/build/main",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath":"/usr/bin/gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/189817.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Odin Inspector 系列教程 — Dictionary Drawer Settings Attribute[通俗易懂]

    Odin Inspector 系列教程 — Dictionary Drawer Settings Attribute[通俗易懂]DictionaryDrawerSettings自定义字典绘制方式默认以左侧为key,右侧为value的形式展示,如果需要进行序列化,需要继承自SerializedMonoBehaviour[DictionaryDrawerSettings()][ShowInInspector][InfoBox(“为了序列化字典,我们需要做…

    2022年7月21日
    18
  • spring源码分析-spring与tomcat整合原理

    spring源码分析-spring与tomcat整合原理

    2021年8月4日
    56
  • 隐私政策_隐私政策一定要加同意吗

    隐私政策_隐私政策一定要加同意吗隐私政策

    2022年4月20日
    81
  • 数据挖掘之异常点检测「建议收藏」

    数据挖掘之异常点检测「建议收藏」异常点检测方法一、基本概念  异常对象被称作离群点。异常检测也称偏差检测和例外挖掘。  常见的异常成因:数据来源于不同的类(异常对象来自于一个与大多数数据对象源(类)不同的源(类)的思想),自然变异,以及数据测量或收集误差。  异常检测的方法:(1)基于模型的技术:首先建立一个数据模型,异常是那些同模型不能完美拟合的对象;如果模型是簇

    2022年7月16日
    17
  • StrictMode介绍[通俗易懂]

    StrictMode介绍[通俗易懂]第1页:  【IT168技术  】最新的Android平台中(Android2.3起),新增加了一个新的类,叫StrictMode(android.os.StrictMode)。这个类可以用来帮助开发者改进他们编写的应用,并且提供了各种的策略,这些策略能随时检查和报告开发者开发应用中存在的问题,比如可以监视那些本不应该在主线程中完成的工作或者其他的一些不规范和不好的代码。  Stri

    2022年5月1日
    66
  • AbstractInterceptor和MethodFilterInterceptor的区别

    AbstractInterceptor和MethodFilterInterceptor的区别1.AbstractInterceptor是Interceptor的子类。2.MethodFilterInterceptor是AbstractInterceptor的子类,你需要实现的拦截器支持方法过滤性,就继承MethodFilterIntercepter这个类.默认的情况下,拦截器会拦截Action中的所有的方法,这里不包括setter或getter方法.这时就可以使用方法

    2022年5月14日
    41

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号