在Linux(Ubuntu)中使用终端编译 && vscode安装

文章目录

📚在Linux(Ubuntu)中使用终端编译

🐇.cpp程序编译

  1. 创建及浏览文件 :新建test1文件夹,创建hello.cpp程序,并浏览文件夹。

  2. vim打开文件 :修改内容。:wq保存并退出。

    cpp 复制代码
    #include<stdio.h>
    int main()
    {
    	printf("Hello world !\n");
    	return 0;
    }
  3. 运行.cpp程序 :gcc -o hello hello.cpp,编译完成后可以看到在和hello.cpp相同目录下有一个hello的可执行文件。然后在当前路径下运行编译后的可执行文件:./hello

🐇.py程序编译

  1. 创建py文件
  2. 编译运行 :python3 hello1.py

🐇查看Python、C++编程环境

📚vscode安装

  • 在应用商店搜索后直接install

  • 安装对应的插件即可编译运行

相关推荐
GeW1 小时前
制造强国底座:Linux与数据库驱动的新型工业基础设施
linux
xiaoye-duck1 小时前
《Linux 网络编程》深入理解 IO 多路复用:select 函数详解与 Echo 服务实战
linux·网络
Tairitsu_H1 小时前
[Linux系统] 命令行参数 | 环境变量 | 程序地址空间
linux·环境变量·命令行参数·程序地址空间
雯宝1 小时前
devices_init / buses_init / classes_init / firmware_init / hypervisor_init 函数
linux
技术人生0012 小时前
VMware Workstation 安装 Ubuntu 24.04 LTS 完整教程
运维·服务器·ubuntu
M78佐菲2 小时前
ARM学习笔记(12)
linux·arm开发·笔记·嵌入式硬件·学习
可涵不会debug3 小时前
C++ std::bind 实战教程:线程池、回调场景全覆盖
linux·开发语言·c++
风华同学3 小时前
vscode远程连接
ide·vscode·编辑器
青梅味猪大肠3 小时前
【操作系统-26】进程互斥软件实现-Peterson算法
linux·运维·服务器
wdfk_prog4 小时前
Wi-Fi Direct教程 01:在 Ubuntu 搭建双 mac80211_hwsim + wpa_supplicant 2.12
linux·运维·服务器·ubuntu·ros·wifi-direct