fixed compile and dynamic link issue for VC++ proj

This commit is contained in:
2016-12-15 21:45:35 +08:00
parent 684dedfa90
commit 020ba989db
5 changed files with 34 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ out/
libs/
obj/
.idea/
ipch/
cmake-build-debug/
cmake-build-release/
Debug/

View File

@@ -194,12 +194,10 @@ typedef struct irda_data_tv
} irda_data_tv_t;
/*
* export functions
*/
extern INT8 tv_lib_open(UINT8* binary, UINT16 binary_length);
extern BOOL tv_lib_parse(UINT8 encode_type);
extern UINT16 tv_lib_control(UINT8 key, UINT16 *user_data);
#ifdef __cplusplus

View File

@@ -0,0 +1,20 @@
LIBRARY
EXPORTS
irda_context_init @1
irda_ac_lib_open @2
irda_ac_lib_parse @3
irda_ac_lib_control @4
irda_ac_lib_close @5
irda_tv_lib_open @6
irda_tv_lib_parse @7
irda_tv_lib_control @8
irda_tv_lib_close @9
get_temperature_range @10
get_supported_mode @11
get_supported_wind_speed @12
get_supported_swing @13
get_supported_wind_direction @14
irda_ac_file_open @15
irda_tv_file_open @16

View File

@@ -28,7 +28,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -92,6 +92,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>.\ir_decode.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -189,6 +190,9 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="ir_decode.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -324,6 +324,7 @@ INT8 irda_ac_lib_open(UINT8 *binary, UINT16 binary_length)
INT8 irda_context_init()
{
IR_PRINTF("init context");
irda_memset(context, 0, sizeof(protocol));
return IR_DECODE_SUCCEEDED;
}
@@ -1027,6 +1028,11 @@ void irda_ac_lib_close()
tags = NULL;
}
free_ac_context();
if (NULL != binary_content)
{
free(binary_content);
}
return;
}