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 handle __declspec(dllimport) properly #5
Comments
|
This is not a converter issue but an issue with the code tree itself. Also, --enable-shared builds with libav do work just fine, see e.g. http://fate.libav.org/i686-msvc-10-dll-wine/20130212192512. |
|
I had thought that the purpose of av_export was to allow constants to be shared cross dll's with msvc builds, e.g. this line libavcodec/mjpeg.h (which seems to work line). What's the difference here, anybody know, between that and this line? libavformat/riff.h which seems to fail? (I put the av_export in there thinking it would fix msvc builds...) update: I guess ff_codec_bmp_tags is used differently than "most other shared constants" so will need special treatment... (hence it causing error C2099: Initializer is not a constant but others don't) (@malbe Thanks for your help to this confused developer. |
|
Yes when I removed av_export it works, and the .dlls still export the functions correctly so I guess that's done redundantly elsewhere via another mechanism. I just wanted to report it incase it was unexpected behavior. |
|
av_export is not needed when exporting a symbol, but actually when importing it. Its a bit misleading that way. |
|
Makes me wonder if av_export is needed at all these days...maybe the use of .v files makes them it needed these days? |
|
I indeed don't think you need av_export ATM. |
|
You do need it when importing data from shared libraries in msvc, which is |
|
We enforce that as a linker option instead, I believe? |
|
ok thanks for your help here, git master should compile now, thanks! |
When trying to compile ffmpeg with --enable-shared, the conversion fails.
This can be traced to this define
define av_export __declspec(dllimport)
And for example in libavformat/asfenc.c
It fails due to this line getting included from riff.h
extern av_export const AVCodecTag ff_codec_bmp_tags[];
Which creates in the converted c89 file for asfenc.c
extern __declspec(dllimport) const AVCodecTag ff_codec_bmp_tags[];
causing this line to have a compile error (in asfenc.c)
static const AVCodecTag * const tmp__1[] = {
codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0
};
--> error C2099: Initializer is not a constant
Maybe this isn't fixable though? Not sure
The text was updated successfully, but these errors were encountered: