Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_rules("cppfront")无法支持.h2的头文件 #4938

Closed
shaoxie1986 opened this issue Apr 6, 2024 · 1 comment
Closed

add_rules("cppfront")无法支持.h2的头文件 #4938

shaoxie1986 opened this issue Apr 6, 2024 · 1 comment
Labels
Milestone

Comments

@shaoxie1986
Copy link
Contributor

Xmake 版本

2.8.9

操作系统版本和架构

Windows 11 Version 23H2

描述问题

cppfront 0.7.0版本,使用add_rules("cppfront"),使用.h2文件的时候,提示:error: unknown source file: src\hello.h2,而.h2的文件是cppfront的头文件,目前无法支持。

期待的结果

使用add_rules("cppfront")之后,添加add_files("xxx.h2")应该能使用cppfront生成对应的.h文件

工程配置

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

add_requires("cppfront")

target("cppfront_app")
    set_kind("binary")
    add_rules("cppfront")
    add_files("src/*.cpp2")
    add_files("src/*.h2")
   
    add_packages("cppfront")

附加信息和错误日志

checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for zig ... ok
checking for nim ... ok
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... D:\scoop\apps\xmake\current\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
checking for cppfront ... no
error: @programdir\core\main.lua:329: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\core\project\project.lua:915: @programdir\core\project\target.lua:2166: unknown source file: src\hello.h2
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:957]:
[@programdir\core\project\target.lua:2166]: in function 'sourcebatches'
[@programdir\core\project\target.lua:2121]: in function 'sourcekinds'
[@programdir\rules\cppfront\xmake.lua:26]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\project\target.lua:85]: in function '_load_rule'
[@programdir\core\project\target.lua:110]: in function '_load_rules'
[@programdir\core\project\target.lua:122]: in function '_load'
[@programdir\core\project\project.lua:408]: in function '_load_targets'
[@programdir\core\project\project.lua:913]: in function 'targets'
[@programdir\actions\config\main.lua:116]: in function '_check_targets'
[@programdir\actions\config\main.lua:395]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\sandbox\modules\import\core\base\task.lua:63]: in function 'run'
[@programdir\actions\build\main.lua:191]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:275]:
[@programdir\core\base\task.lua:491]: in function 'run'
[@programdir\core\main.lua:327]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:

stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:957: in function 'os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:329: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>

@shaoxie1986 shaoxie1986 added the bug label Apr 6, 2024
@Issues-translate-bot
Copy link

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


Title: add_rules("cppfront") cannot support .h2 header files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants