From 1487ec4da0919527de81814ab4ad38b9eb0af167 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Fri, 13 Dec 2013 00:45:20 +0200 Subject: [PATCH] d3dcompiler_qt: Fix export warning on MSVC MSVC warns about multiple symbols when using extern "C", but MinGW requires it. #ifdef it for MinGW. Change-Id: I8b16ab4ea129312787090e042115d8f709fdd814 Reviewed-by: Oliver Wolff --- src/angle/src/d3dcompiler/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/angle/src/d3dcompiler/main.cpp b/src/angle/src/d3dcompiler/main.cpp index 96d71d5e0d..70a8f30fb0 100644 --- a/src/angle/src/d3dcompiler/main.cpp +++ b/src/angle/src/d3dcompiler/main.cpp @@ -188,9 +188,12 @@ static QString makePath(const QDir &parent, const QString &child) } // namespace D3DCompiler -extern "C" __declspec(dllexport) HRESULT WINAPI D3DCompile( +#ifdef __MINGW32__ +extern "C" +#endif +__declspec(dllexport) HRESULT WINAPI D3DCompile( const void *, SIZE_T, const char *, const D3D_SHADER_MACRO *, ID3DInclude *, - const char *t, const char *, UINT, UINT, ID3DBlob **, ID3DBlob **); + const char *, const char *, UINT, UINT, ID3DBlob **, ID3DBlob **); HRESULT WINAPI D3DCompile( const void *data, SIZE_T data_size, const char *filename,