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

Fails to compile when there is no audio support #483

Open
gyroninja opened this issue Dec 17, 2017 · 5 comments
Open

Fails to compile when there is no audio support #483

gyroninja opened this issue Dec 17, 2017 · 5 comments
Labels

Comments

@gyroninja
Copy link

When I tried to compile toxic without audio support it failed to compile. There were errors in video_call.c trying to use variables that only exist when audio support is enabled.

@JFreegman
Copy link
Owner

Can you post the errors please

@gyroninja
Copy link
Author

toxic/src/video_call.c:223:28: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
             if ( windows[i].is_call && windows[i].num == friend_number ) {
                            ^
toxic/src/video_call.c: In function ‘cmd_video’:
toxic/src/video_call.c:267:15: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
     if ( !self->is_call ) {
               ^~
toxic/src/video_call.c: In function ‘cmd_ccur_video_device’:
toxic/src/video_call.c:398:14: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
     if ( self->is_call ) {
              ^~
toxic/src/video_call.c:413:9: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘video_device_selection’
     self->video_device_selection[type] = selection;
         ^~
make: *** [Makefile:75: toxic/build/video_call.o] Error 1```

@JFreegman
Copy link
Owner

Sorry it's taken so long to get back to this. Are you still having this problem? I can't reproduce it.

@gyroninja
Copy link
Author

I don't use that system anymore, but I believe that issue is still there.
is_call is defined only if audio is enabled. If you have video enabled it will compile this
The issue stems from the assumption that if video is enabled audio is enabled, but that is not necessarily the case.
IIRC it was pretty simple to reproduce. You just needed to edit this to always fail.

@JFreegman
Copy link
Owner

The issue stems from the assumption that if video is enabled audio is enabled, but that is not necessarily the case.

That makes sense. I never considered someone might try to compile with video but not audio. Thanks.

@JFreegman JFreegman added the bug label Jan 25, 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