* [FFmpeg-devel] PRIx64 and msvc @ 2023-03-08 15:01 info 2023-03-08 16:10 ` Hendrik Leppkes 0 siblings, 1 reply; 5+ messages in thread From: info @ 2023-03-08 15:01 UTC (permalink / raw) To: ffmpeg-devel I'm compiling with msvc and get some errors with PRIx64 and similars. For example: snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); won't compile, but this work (with the extra space): snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout); Can this be included in the sources without introducing problems for other platforms? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] PRIx64 and msvc 2023-03-08 15:01 [FFmpeg-devel] PRIx64 and msvc info @ 2023-03-08 16:10 ` Hendrik Leppkes 2023-03-08 16:33 ` info 0 siblings, 1 reply; 5+ messages in thread From: Hendrik Leppkes @ 2023-03-08 16:10 UTC (permalink / raw) To: FFmpeg development discussions and patches On Wed, Mar 8, 2023 at 4:02 PM <info@gardinal.net> wrote: > > I'm compiling with msvc and get some errors with PRIx64 and similars. > For example: > snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); > > won't compile, but this work (with the extra space): > snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout); > > Can this be included in the sources without introducing problems for > other platforms? You'll have to provide more information. We have automated builds with MSVC which are running just fine right now. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] PRIx64 and msvc 2023-03-08 16:10 ` Hendrik Leppkes @ 2023-03-08 16:33 ` info 2023-03-08 16:38 ` Hendrik Leppkes 0 siblings, 1 reply; 5+ messages in thread From: info @ 2023-03-08 16:33 UTC (permalink / raw) To: FFmpeg development discussions and patches Le 2023-03-08 09:10, Hendrik Leppkes a écrit : > On Wed, Mar 8, 2023 at 4:02 PM <info@gardinal.net> wrote: >> >> I'm compiling with msvc and get some errors with PRIx64 and similars. >> For example: >> snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); >> >> won't compile, but this work (with the extra space): >> snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout); >> >> Can this be included in the sources without introducing problems for >> other platforms? > > You'll have to provide more information. We have automated builds with > MSVC which are running just fine right now. > > - Hendrik > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". For example, in ffplay.c sample (ffmpeg version 5.0.2): if (is->audio_filter_src.channel_layout) snprintf(asrc_args + ret, sizeof(asrc_args) - ret, ":channel_layout=0x%"PRIx64, is->audio_filter_src.channel_layout); gives the following error: error C3688: invalid literal suffix 'PRIx64'; literal operator or literal operator template 'operator ""PRIx64' not found The error is gone when adding a space before PRIx64. Note that I'm mixing C and C++ in my projet. Compiling in plain C seems to work. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] PRIx64 and msvc 2023-03-08 16:33 ` info @ 2023-03-08 16:38 ` Hendrik Leppkes 2023-03-08 16:54 ` info 0 siblings, 1 reply; 5+ messages in thread From: Hendrik Leppkes @ 2023-03-08 16:38 UTC (permalink / raw) To: FFmpeg development discussions and patches On Wed, Mar 8, 2023 at 5:34 PM <info@gardinal.net> wrote: > > Le 2023-03-08 09:10, Hendrik Leppkes a écrit : > > On Wed, Mar 8, 2023 at 4:02 PM <info@gardinal.net> wrote: > >> > >> I'm compiling with msvc and get some errors with PRIx64 and similars. > >> For example: > >> snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); > >> > >> won't compile, but this work (with the extra space): > >> snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout); > >> > >> Can this be included in the sources without introducing problems for > >> other platforms? > > > > You'll have to provide more information. We have automated builds with > > MSVC which are running just fine right now. > > > > - Hendrik > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > For example, in ffplay.c sample (ffmpeg version 5.0.2): > > if (is->audio_filter_src.channel_layout) > snprintf(asrc_args + ret, sizeof(asrc_args) - ret, > ":channel_layout=0x%"PRIx64, > is->audio_filter_src.channel_layout); > > gives the following error: > error C3688: invalid literal suffix 'PRIx64'; literal operator or > literal operator template 'operator ""PRIx64' not found > > The error is gone when adding a space before PRIx64. > > Note that I'm mixing C and C++ in my projet. Compiling in plain C seems > to work. This is C code, it has to be compiled as C. You can set this for every individual file in MSVC if you have to. We cannot support modifications or custom projects, of course. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] PRIx64 and msvc 2023-03-08 16:38 ` Hendrik Leppkes @ 2023-03-08 16:54 ` info 0 siblings, 0 replies; 5+ messages in thread From: info @ 2023-03-08 16:54 UTC (permalink / raw) To: FFmpeg development discussions and patches Le 2023-03-08 09:38, Hendrik Leppkes a écrit : > On Wed, Mar 8, 2023 at 5:34 PM <info@gardinal.net> wrote: >> >> Le 2023-03-08 09:10, Hendrik Leppkes a écrit : >> > On Wed, Mar 8, 2023 at 4:02 PM <info@gardinal.net> wrote: >> >> >> >> I'm compiling with msvc and get some errors with PRIx64 and similars. >> >> For example: >> >> snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); >> >> >> >> won't compile, but this work (with the extra space): >> >> snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout); >> >> >> >> Can this be included in the sources without introducing problems for >> >> other platforms? >> > >> > You'll have to provide more information. We have automated builds with >> > MSVC which are running just fine right now. >> > >> > - Hendrik >> > _______________________________________________ >> > ffmpeg-devel mailing list >> > ffmpeg-devel@ffmpeg.org >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > >> > To unsubscribe, visit link above, or email >> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >> >> For example, in ffplay.c sample (ffmpeg version 5.0.2): >> >> if (is->audio_filter_src.channel_layout) >> snprintf(asrc_args + ret, sizeof(asrc_args) - ret, >> ":channel_layout=0x%"PRIx64, >> is->audio_filter_src.channel_layout); >> >> gives the following error: >> error C3688: invalid literal suffix 'PRIx64'; literal operator or >> literal operator template 'operator ""PRIx64' not found >> >> The error is gone when adding a space before PRIx64. >> >> Note that I'm mixing C and C++ in my projet. Compiling in plain C >> seems >> to work. > > This is C code, it has to be compiled as C. You can set this for every > individual file in MSVC if you have to. > > We cannot support modifications or custom projects, of course. > > - Hendrik > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Alright, thanks for the quick response. Every time I update ffmpeg, I have to manually add those spaces. I was thinking that I may not be the only one in this situation and that adding these spaces in the sources could help other people. Best regards, - Gardinal _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-08 17:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-08 15:01 [FFmpeg-devel] PRIx64 and msvc info 2023-03-08 16:10 ` Hendrik Leppkes 2023-03-08 16:33 ` info 2023-03-08 16:38 ` Hendrik Leppkes 2023-03-08 16:54 ` info
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git