在C语言学习时遇到的问题undefined reference to `print_star‘
·
问题描述(和老师的代码相同依然遇到的问题,导入老师的项目也没有解决问题):

gcc.exe D:\project\project_c\function\main.c -lstdc++ -o main
gcc.exe D:\project\project_c\function\main.c -lstdc++ -o main
D:\CLion 2024.3.2\bin\mingw\bin/ld.exe: C:\Users\33401\AppData\Local\Temp\cc0pVTFh.o:main.c:(.text+0x1a): undefined reference to `print_star'
D:\CLion 2024.3.2\bin\mingw\bin/ld.exe: C:\Users\33401\AppData\Local\Temp\cc0pVTFh.o:main.c:(.text+0x22): undefined reference to `print_message'
D:\CLion 2024.3.2\bin\mingw\bin/ld.exe: C:\Users\33401\AppData\Local\Temp\cc0pVTFh.o:main.c:(.text+0x2c): undefined reference to `print_star'
collect2.exe: error: ld returned 1 exit status
(初学者遇到的问题,各位大佬不喜勿喷)

更多推荐


所有评论(0)