大佬们,vscode,C语言的,安装完是可以汇编的,但是重启了后不行
vscode吧
全部回复
仅看楼主
level 2
一摸一样的的代码,安装完后是可以汇编然后运行的,但是重启电脑后汇编代码就会出现第一张图的情况
2024年08月14日 12点08分 1
level 2
百度也百度不出我这种情况[阴险]
2024年08月14日 12点08分 2
1)图一太小了看不见;2)Windows 上不建议使用 MinGW-w64 中的 GCC ,CMake + MSVC 才是 Windows C/C++ 开发的最佳实践
2024年08月15日 02点08分
@帅哥就是我1972 可以但不建议,Windows上需要Win10/Win11 SDK,这一部分MinGW是不提供的。每个系统均有官方指定编译器,按官方要求走是最好的
2024年08月15日 04点08分
level 2
没发现图一那么糊,补上[泪]
2024年08月15日 03点08分 3
level 2
* 正在执行任务: C:/Windows/System32/cmd.exe /d /c gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 -c d:\workplace\c\demo.c -o .\build\Debug\demo.o && gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 -c d:\workplace\c\hello.c -o .\build\Debug\hello.o && gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 .\build\Debug\demo.o .\build\Debug\hello.o -o .\build\Debug\outDebug.exe
.\build\Debug\hello.o: In function `main':
d:/workplace/c/hello.c:2: multiple definition of `main'
.\build\Debug\demo.o:d:/workplace/c/demo.c:2: first defined here
collect2.exe: error: ld returned 1 exit status
* 终端进程“C:\Windows\System32\cmd.exe '/d', '/c', 'gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 -c d:\workplace\c\demo.c -o .\build\Debug\demo.o && gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 -c d:\workplace\c\hello.c -o .\build\Debug\hello.o && gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 .\build\Debug\demo.o .\build\Debug\hello.o -o .\build\Debug\outDebug.exe'”已终止,退出代码: 1。
2024年08月15日 03点08分 4
level 1
你的demo.c又有一个main函数,重定义了
2024年08月15日 10点08分 5
level 1
[惊哭]是我眼睛出问题了吗,没看到汇编啊
2024年08月16日 05点08分 7
1