Linux可以用vs2019,使用visual studio 2019进行Linux系统编程
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
上篇说到一个简单模块如何直接在ubuntu下进行linux 模块驱动程序开发测试,这次讲如何用c操作模块?
使用visual studio 2019进行Linux系统编程
首先打开:
修改、安装Linux工具:
新建Linux工程、远程连接Linux服务器、配置编译器:
项目属性配置:
Ubuntu系统安装工具:
目标 Linux 系统必须安装 openssh-server、g++、gdb 和 make 。 仅 CMake 项目需要 ninja-build 。
sudo apt-get install openssh-server g++ gdb make ninja-build rsync zip
启动ssh:
sudo service ssh start
模块加载位置:/sys/module
测试:断点记得打上(不然不能调式)
测试程序:
#include #include #include #include int main() {
int fd = 0;
char* hello_node = "/sys/module/day";
/*O_RDWR只读打开,O_NDELAY非阻塞方式*/
if ((fd = open(hello_node, O_RDONLY)) < 0) {
printf("APP open failed %d\n", fd);
}
else {
printf("APP open success\n");
}
close(fd);
return 0;
}
GitHub 加速计划 / li / linux-dash
6
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献1条内容
所有评论(0)