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

Compilation Errors After Downloading from Latest Version #196

Open
zoushiyin opened this issue Jan 7, 2025 · 1 comment
Open

Compilation Errors After Downloading from Latest Version #196

zoushiyin opened this issue Jan 7, 2025 · 1 comment

Comments

@zoushiyin
Copy link

Hello,

I hope this message finds you well. I recently downloaded the latest version of the project, but I encountered some compilation errors when trying to build it. I would greatly appreciate any assistance you can provide to help resolve these issues.

Compilation Errors:
/deskhop/src/tasks.c: In function 'screensaver_jitter':
/deskhop/src/tasks.c:82:14: error: initializer element is not constant
.y = jitter_distance,
^~~~~~~~~~~~~~~
/deskhop/src/tasks.c:82:14: note: (near initialization for 'report.y')
CMakeFiles/deskhop.dir/build.make:242: recipe for target 'CMakeFiles/deskhop.dir/src/tasks.c.obj' failed
make[2]: *** [CMakeFiles/deskhop.dir/src/tasks.c.obj] Error 1
CMakeFiles/Makefile2:1495: recipe for target 'CMakeFiles/deskhop.dir/all' failed
make[1]: *** [CMakeFiles/deskhop.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Thank you very much for your time and assistance. Any guidance on how to resolve these compilation errors would be highly appreciated.

@hrvach
Copy link
Owner

hrvach commented Jan 8, 2025

Which gcc version are you using?

That section was patched recently indeed, but literally says:

    const int16_t jitter_distance = 2;
    static mouse_report_t report = {
        .y = jitter_distance,
        .mode = RELATIVE,
    };

so ... kinda is constant :) Builds fine on my end, but if it's a wider issue I'll change it to provide compatibility with older compilers.

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

No branches or pull requests

2 participants