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

*.RC2 files can not be parsed #5134

Closed
richionizor opened this issue May 23, 2024 · 2 comments
Closed

*.RC2 files can not be parsed #5134

richionizor opened this issue May 23, 2024 · 2 comments
Labels
Milestone

Comments

@richionizor
Copy link

Xmake Version

v2.9.1+master.e642997ba

Operating System Version and Architecture

Windows 10 (x64)

Describe Bug

When specifying an RC2 resource file, xmake throws an error:

error: @programdir\core\main.lua:329: @programdir\core\sandbox\modules\import\core\base\task.lua:65: @programdir\core\project\target.lua:2204: unknown source file: FALCLIB\INCLUDE\Falcon4.rc2
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [@programdir\core\project\target.lua:2204]: in function 'sourcebatches'
    [...r\rules\c++\modules\modules_support\compiler_support.lua:139]: in function 'contains_modules'
    [@programdir\rules\c++\modules\xmake.lua:35]: in function 'on_config'
    [...dir\core\sandbox\modules\import\core\project\project.lua:133]: in function '_config_target'
    [...dir\core\sandbox\modules\import\core\project\project.lua:157]: in function '_config_targets'
    [...dir\core\sandbox\modules\import\core\project\project.lua:208]: in function 'load_targets'
    [@programdir\actions\config\main.lua:407]:
    [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:973: in function 'base/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>

Expected Behavior

According to https://learn.microsoft.com/en-us/cpp/build/reference/resource-files-cpp?view=msvc-170 , RC2 files have the same syntax as regular resource files, they are just shared between multiple projects.

Project Configuration

target("foo")
	set_kind("binary")
	add_rules("win.sdk.application")
        add_files("resources/res.rc", "resources/res.rc2")
        -- ...

Additional Information and Error Logs

see above

@waruqi waruqi mentioned this issue May 23, 2024
@waruqi
Copy link
Member

waruqi commented May 23, 2024

try this patch. #5135

xmake update -s github:xmake-io/xmake#rc2

@richionizor
Copy link
Author

#5135 works, thanks!

@waruqi waruqi added this to the v2.9.2 milestone May 23, 2024
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

2 participants