toxic icon indicating copy to clipboard operation
toxic copied to clipboard

Fails to compile when there is no audio support

Open gyroninja opened this issue 7 years ago • 5 comments

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.

gyroninja avatar Dec 17 '17 09:12 gyroninja

Can you post the errors please

JFreegman avatar Dec 17 '17 14:12 JFreegman

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```

gyroninja avatar Dec 17 '17 22:12 gyroninja

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

JFreegman avatar Mar 04 '18 05:03 JFreegman

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.

gyroninja avatar Mar 04 '18 08:03 gyroninja

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 avatar Mar 04 '18 08:03 JFreegman