xmake-vscode icon indicating copy to clipboard operation
xmake-vscode copied to clipboard

vscode的xmake插件创建C项目但是创建出来的文件是.cpp文件

Open KinhoLeung opened this issue 1 year ago • 4 comments

Xmake 版本

2.9.6

操作系统版本和架构

win11 23H2 X64

描述问题

vscode的xmake插件新建C项目但是创建出来的文件却是.cpp文件,并且这个.cpp文件使用了c++的库

期待的结果

期望创建出来的是.c文件

工程配置

add_rules("mode.debug", "mode.release")

target("test") set_kind("binary") add_files("src/*.cpp")

附加信息和错误日志

KinhoLeung avatar Nov 27 '24 09:11 KinhoLeung

Bot detected the issue body's language is not English, translate it automatically.


Title: vscode creates a C project but the file created is a .cpp file

Xmake version

2.9.6

Operating system version and architecture

win11 23H2 X64

Describe the problem

vscode's xmake plug-in creates a new C project, but the file created is a .cpp file, and this .cpp file uses the c++ library

Expected results

What is expected to be created is a .c file

Project configuration

add_rules("mode.debug", "mode.release")

target("test") set_kind("binary") add_files("src/*.cpp")

Additional information and error logs

The xmake plug-in without

Issues-translate-bot avatar Nov 27 '24 09:11 Issues-translate-bot

这个你自己调下插件源码,按理执行 xmake create -l c test 创建的肯定是 c 的。。

waruqi avatar Nov 28 '24 01:11 waruqi

我使用的是Ctrl+Shift+P命令面板中的那个xmake:CreateProject命令创建的,出来的是确实是cpp。

KinhoLeung avatar Nov 28 '24 03:11 KinhoLeung

再试试

waruqi avatar Nov 28 '24 05:11 waruqi