Change the core of glslang to be a static library rather than a DLL.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19952 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2012-12-13 00:09:49 +00:00
parent 9fd55bd338
commit ece0d0ca27
7 changed files with 74 additions and 47 deletions

View File

@ -22,7 +22,6 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -40,17 +39,16 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>
@ -61,16 +59,17 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;UserM_Debug\generic\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;glslang\UserM_Debug\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>UserM_Debug/StandAlone.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>UserM_Debug/StandAlone.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link> </Link>
<Midl> <Midl>
<TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName> <TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName>
@ -97,7 +96,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks> <BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck> <BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
@ -106,18 +105,20 @@
</PrecompiledHeaderOutputFile> </PrecompiledHeaderOutputFile>
<AssemblerListingLocation>UserM_Release/</AssemblerListingLocation> <AssemblerListingLocation>UserM_Release/</AssemblerListingLocation>
<ObjectFileName>UserM_Release/</ObjectFileName> <ObjectFileName>UserM_Release/</ObjectFileName>
<ProgramDataBaseFileName>UserM_Release/Standalone</ProgramDataBaseFileName> <ProgramDataBaseFileName>
</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;Standalone\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;glslang\UserM_Release\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>UserM_Release/StandAlone.exe</OutputFile> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>UserM_Release/StandAlone.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>UserM_Release/StandAlone.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -129,7 +130,7 @@
</Midl> </Midl>
<PostBuildEvent> <PostBuildEvent>
<Message>move exe</Message> <Message>move exe</Message>
<Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe StandAlone</Command> <Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe test</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -137,6 +138,8 @@
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp" />
<ClCompile Include="glslang\GenericCodeGen\Link.cpp" />
<ClCompile Include="Standalone\StandAlone.cpp" /> <ClCompile Include="Standalone\StandAlone.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -10,5 +10,11 @@
<ClCompile Include="Standalone\StandAlone.cpp"> <ClCompile Include="Standalone\StandAlone.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\Link.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -8,9 +8,31 @@ Major items to do:
- version - version
- stage - stage
* Add semantics for all new grammar (1.2 through 4.3) * Add semantics and productions for all new grammar (1.2 through 4.3)
1.2
- uniform initializers
- non-square matrices
- centroids/multisample
- gl_PointCoord
1.3
- integer ops
- integer built-in functions
- switch
- bunch of new built-ins
- noperspective
1.4
- uniform blocks
- layout qualifiers
- texture buffers
1.5
- geometry shaders
3.3
- ...
* Replace the preprocessor with a better one. * Replace the preprocessor with a better one.
* Verify/fix thread safety of the parse context. * Verify/fix thread safety of the parse context.

View File

@ -16,13 +16,12 @@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -40,18 +39,21 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">glslang\UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">glslang\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PostBuildEventUseInBuild>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PostBuildEventUseInBuild>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>glslang;glslang\MachineIndependent;glslang\OSDependent\Windows;OGLCompilersDLL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>glslang;glslang\MachineIndependent;glslang\OSDependent\Windows;OGLCompilersDLL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;_USRDLL;TEST_EXPORTS;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile> </PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@ -62,8 +64,10 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<StringPooling>true</StringPooling>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
@ -106,13 +110,14 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</PrecompiledHeaderOutputFile> </PrecompiledHeaderOutputFile>
<AssemblerListingLocation>UserM_Release/</AssemblerListingLocation> <AssemblerListingLocation>UserM_Release/</AssemblerListingLocation>
<ObjectFileName>UserM_Release/</ObjectFileName> <ObjectFileName>UserM_Release/</ObjectFileName>
<ProgramDataBaseFileName>UserM_Release/glslang</ProgramDataBaseFileName> <ProgramDataBaseFileName>
</ProgramDataBaseFileName>
<BrowseInformation> <BrowseInformation>
</BrowseInformation> </BrowseInformation>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@ -133,7 +138,8 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</Midl> </Midl>
<PostBuildEvent> <PostBuildEvent>
<Message>copy dll</Message> <Message>copy dll</Message>
<Command>xcopy /y UserM_Release\generic\glslang.* StandAlone</Command> <Command>del Test\$(TargetName)$(TargetExt)
xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -164,8 +170,6 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
<ClCompile Include="glslang\MachineIndependent\preprocessor\scanner.c" /> <ClCompile Include="glslang\MachineIndependent\preprocessor\scanner.c" />
<ClCompile Include="glslang\MachineIndependent\preprocessor\symbols.c" /> <ClCompile Include="glslang\MachineIndependent\preprocessor\symbols.c" />
<ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c" /> <ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c" />
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp" />
<ClCompile Include="glslang\GenericCodeGen\Link.cpp" />
<ClCompile Include="glslang\OSDependent\Windows\main.cpp" /> <ClCompile Include="glslang\OSDependent\Windows\main.cpp" />
<ClCompile Include="glslang\OSDependent\Windows\ossource.cpp" /> <ClCompile Include="glslang\OSDependent\Windows\ossource.cpp" />
<ClCompile Include="glslang\OSDependent\Linux\ossource.cpp"> <ClCompile Include="glslang\OSDependent\Linux\ossource.cpp">

View File

@ -17,9 +17,6 @@
<Filter Include="Public"> <Filter Include="Public">
<UniqueIdentifier>{c79e7f4d-1836-4b72-b201-46e72e4e4b6b}</UniqueIdentifier> <UniqueIdentifier>{c79e7f4d-1836-4b72-b201-46e72e4e4b6b}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Generic Code Gen">
<UniqueIdentifier>{b56dd525-2a9c-4ae5-a6b4-d024e624c6b4}</UniqueIdentifier>
</Filter>
<Filter Include="OSDependent"> <Filter Include="OSDependent">
<UniqueIdentifier>{d48b8f48-5784-4cb6-bead-7f98647a1c44}</UniqueIdentifier> <UniqueIdentifier>{d48b8f48-5784-4cb6-bead-7f98647a1c44}</UniqueIdentifier>
</Filter> </Filter>
@ -91,12 +88,6 @@
<ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c"> <ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c">
<Filter>Machine Independent\CPP</Filter> <Filter>Machine Independent\CPP</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp">
<Filter>Generic Code Gen</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\Link.cpp">
<Filter>Generic Code Gen</Filter>
</ClCompile>
<ClCompile Include="glslang\OSDependent\Windows\main.cpp"> <ClCompile Include="glslang\OSDependent\Windows\main.cpp">
<Filter>OSDependent\Windows</Filter> <Filter>OSDependent\Windows</Filter>
</ClCompile> </ClCompile>

View File

@ -58,9 +58,9 @@
// are tracked in the intermediate representation, not the symbol table. // are tracked in the intermediate representation, not the symbol table.
// //
#include "Include/Common.h" #include "../Include/Common.h"
#include "Include/intermediate.h" #include "../Include/intermediate.h"
#include "Include/InfoSink.h" #include "../Include/InfoSink.h"
// //
// Symbol base class. (Can build functions or variables out of these...) // Symbol base class. (Can build functions or variables out of these...)

View File

@ -38,11 +38,12 @@
#ifdef _WIN32 #ifdef _WIN32
#define C_DECL __cdecl #define C_DECL __cdecl
#ifdef SH_EXPORTING //#ifdef SH_EXPORTING
#define SH_IMPORT_EXPORT __declspec(dllexport) // #define SH_IMPORT_EXPORT __declspec(dllexport)
#else //#else
#define SH_IMPORT_EXPORT __declspec(dllimport) // #define SH_IMPORT_EXPORT __declspec(dllimport)
#endif //#endif
#define SH_IMPORT_EXPORT
#else #else
#define SH_IMPORT_EXPORT #define SH_IMPORT_EXPORT
#define __fastcall #define __fastcall