error with decklink
pkviet opened this issue · comments
hi,
i've been having trouble with decklink with the current and previous versions of the generator.
Project generator (this may take several minutes, please wait)... Passing configure file... Outputting config.h... Outputting avconfig.h... Outputting ffversion.h... Outputting enabled components file libavcodec/bsf_list.c... Outputting enabled components file libavformat/protocol_list.c... Generating from Makefile (./ffmpeg/libavcodec/MakeFile)... Generating from Makefile (./ffmpeg/libavcodec/x86/MakeFile)... Generating missing DCE symbols (libavcodec)... Generating project exports file (libavcodec)... Generating project file (libavcodec)... Generating from Makefile (./ffmpeg/libavdevice/MakeFile)... Generating missing DCE symbols (libavdevice)... Generating project exports file (libavdevice)... Invalid switch - "". Error: Errors detected during compilation :- error C1189: #error: The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. Unknown error detected. See ffvs_log.txt for further details.
The ffvs log indicates:
`alldevices.c
avdevice.c
utils.c
file_open.c
decklink_enc_c.c
decklink_dec_c.c
dshow_crossbar.c
dshow.c
dshow_enummediatypes.c
dshow_enumpins.c
dshow_filter.c
dshow_pin.c
dshow_common.c
gdigrab.c
lavfi.c
vfwcap.c
reverse_wrap.c
dce_defs.c
decklink_enc.cpp
decklink_common.cpp
decklink_dec.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xkeycheck.h(250): fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. (compiling source file ffmpeg/libavdevice/decklink_enc.cpp)`
Do you have an idea ?
Thanks
Researching a bit, it seems a solution would be to add _XKEYCHECK_H; to preprocessor definitions for avdevice.
Not sure where to add this in FFVS generator project.
I'll test direct inclusion in the project and adding manually the decklink files in the vcxproj.
update:
so the error is due to 'inline' redefinition; this is related to c++ .
I could fix the issue manually by including _XKEYCHECK_H in the preprocessor defs for all projects (after adding all decklink files to vcxproj).
Don't know where to add through FFVS though.
ok got it, it's in the templates; will open a PR for that; tell me if it is a suitable solution
not working. Still missing something.
ok got it eventually; ffmpeg does compile now correctly. Will reopen an updated PR (added _XKEYCHECK_H to cl.exe )
I added an alternate commit that addresses this issue. Let me know if it works for you.
yes it does the job; great !
Not a real issue, but I noticed with this commit (and mine), there are 1770 warnings:
ex:
Warning C4335 Mac file format detected: please convert the source file to either DOS or UNIX format libavutil ffmpeg\SMP\compat.h 1 Build
Thats an error due to checkout settings on your end. In the repo all line endings are LF (Unix) and should are assumed to remain that way on checkout. However git autocrlf settings can mess with that. Ill add a new commit to fix this.