用户工具

站点工具


jaysnote:linux_c_app_development

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版 两侧同时换到之后的修订记录
jaysnote:linux_c_app_development [2018/12/27 12:11]
jaylee
jaysnote:linux_c_app_development [2018/12/27 12:12]
jaylee 已恢复为旧版 (2018/12/25 14:00)
行 1: 行 1:
 <markdown> <markdown>
 +
 +
 +
 +# 使用VS2017 开发Linux C应用
  
 * [Visual C++ for Linux Development](https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/) * [Visual C++ for Linux Development](https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/)
行 19: 行 23:
   ```   ```
   echo "echo ARM" > /bin/uname #暂时不支持arrch64,需要重定向uname   echo "echo ARM" > /bin/uname #暂时不支持arrch64,需要重定向uname
-  ```+  ```   
  
 ### include ### include
行 37: 行 41:
 测试发现原来此过程发生在选项->跨平台->连接管理器->远程标头 IntelliSense 管理器,会自动打包Linux 编译机器上面的`/usr/include`然后到Windows 解压。 测试发现原来此过程发生在选项->跨平台->连接管理器->远程标头 IntelliSense 管理器,会自动打包Linux 编译机器上面的`/usr/include`然后到Windows 解压。
  
-![](images/inlude_header_download.png)+![](http://www.leconiot.com/md_res//jaysnote/linux_c_app_development/images/inlude_header_download.png)
  
  
行 47: 行 51:
 属性页->链接->所有选项->库链接项 属性页->链接->所有选项->库链接项
  
-![库依赖项](images/lib.png)+![库依赖项](http://www.leconiot.com/md_res//jaysnote/linux_c_app_development/images/lib.png)
  
 ``` ```
行 64: 行 68:
 Unable to start debugging. Unexpected GDB output from command "-interpreter-exec console "target remote localhost:63442"". Remote connection closed Unable to start debugging. Unexpected GDB output from command "-interpreter-exec console "target remote localhost:63442"". Remote connection closed
 ``` ```
-![](images/debug_error.png)+![](http://www.leconiot.com/md_res//jaysnote/linux_c_app_development/images/debug_error.png)
  
 确定了Linux GDBServer版本 确定了Linux GDBServer版本
行 114: 行 118:
 ### Microsoft.Build.Linux.Shared.ExceptionTTY ### Microsoft.Build.Linux.Shared.ExceptionTTY
  
-![](images/debug_error2.png)                                                                                                                       +![](http://www.leconiot.com/md_res//jaysnote/linux_c_app_development/images/debug_error2.png) 
 +                                                                                                               
 https://github.com/Microsoft/VSLinux/issues/278 https://github.com/Microsoft/VSLinux/issues/278
  
-最后确定和在`~/.bashrc` 启动中有未识别字符,和`echo -e`  的格式化字符串有关系,直接删除了`.bashrc`(删除前记得备份)+最后确定和TERM 类型有关系,更改了`.bashrc`。
  
-> **提示**:`vslinux_ttyexception_log.txt` 中有详细记录。 
  
-### cannot open display 
- 
-调试 gtk 桌面引用提示不能代开显示。 
- 
-``` 
-Unable to init server: Could not connect: Connection refused 
- 
-(factory_test.out:7951): Gtk-WARNING **: cannot open display:  
-``` 
- 
-所有的x 桌面应用都一致需要指定显示的`x server`。 
- 
-``` 
-export DISPLAY=:0 
-``` 
- 
-同时,`x server` 限制连接账号。所以如果要通过`root`调试,会麻烦一些。 
- 
-``` 
-export DISPLAY=:0 
-xhost +                          #第二次运行可能会阻塞 
-cp /home/pi/.Xauthority /root/   #每次重启后该文件需要重新拷贝。 
-``` 
  
 </markdown> </markdown>
jaysnote/linux_c_app_development.txt · 最后更改: 2021/06/22 23:14 (外部编辑)