Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Changes required fix build on Windows with MSVC #23

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

nirbheek
Copy link
Contributor

@nirbheek nirbheek commented Jan 9, 2022

windows: Export/import library symbols for linking

Without this, gstawscredentials-1.0.lib is not generated by LINK.exe
because no symbols are exported, and compilation fails.

We can simply use the symbols exported by gstreamer in gst/gstconfig.h
to do this correctly.

Related to https://github.com/amzn/amazon-s3-gst-plugin/issues/13
windows: Fix debug category linkage

Fixes this linker error:

libmultipartuploader.a(gsts3multipartuploader.cpp.obj) : error LNK2001: unresolved external symbol "struct _GstDebugCategory * gst_s3_sink_debug" (?gst_s3_sink_debug@@3PEAU_GstDebugCategory@@EA)
src/gsts3elements.dll : fatal error LNK1120: 1 unresolved externals

Essentially, the debug category is a C symbol, so put it inside
G_BEGIN_DECLS so that it doesn't get C++ symbol mangling.

This PR plus aws/aws-sdk-cpp#1839 fixes #13

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Without this, gstawscredentials-1.0.lib is not generated by LINK.exe
because no symbols are exported, and compilation fails.

We can simply use the symbols exported by gstreamer in gst/gstconfig.h
to do this correctly.

Related to amzn#13
Fixes this linker error:

libmultipartuploader.a(gsts3multipartuploader.cpp.obj) : error LNK2001: unresolved external symbol "struct _GstDebugCategory * gst_s3_sink_debug" (?gst_s3_sink_debug@@3PEAU_GstDebugCategory@@ea)
src/gsts3elements.dll : fatal error LNK1120: 1 unresolved externals

Essentially, the debug category is a C symbol, so put it inside
G_BEGIN_DECLS so that it doesn't get C++ symbol mangling.
@loganek loganek merged commit b4de729 into amzn:master Jan 21, 2022
@nirbheek nirbheek deleted the fix-windows-build branch January 21, 2022 10:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build on Windows
2 participants