我使用VS Linux C开发支持来创建Linux C项目,然后在Virtualbox上连接Ubuntu远程调试 . 但控制台已经打印了一些错误消息 .
如何让VS2017正确打印Linux C程序的输出?
环境
Windows 10 Pro x64
Microsoft Visual Studio社区2017 15.3.3 - VS Linux C开发支持
Virtualbox 5.1.26
Ubuntu 16.04 LTS x64
步
Shift Ctrl N.
创建一个新的Linux项目
ConsoleApplication
跑
填写SSH用户名和密码(Ubuntu 16.04 Virtualbox)
main.cpp
#include
int main()
{
printf("hello from ConsoleApplication1!\n");
return 0;
}
控制台
=thread-group-added,id="i1"
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
=cmd-param-changed,param="pagination",value="off"
Loaded 'shared libraries loaded at this time.'. Cannot find or open the symbol file.
Stopped due to shared library event:
Inferior loaded /lib/x86_64-linux-gnu/libc.so.6
/lib64/ld-linux-x86-64.so.2
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Cannot find or open the symbol file.
Loaded '/lib64/ld-linux-x86-64.so.2'. Cannot find or open the symbol file.
[Inferior 1 (process 14481) exited normally]
程序“”已退出,返回值为 0 (0x0)。