Updated Windows C++ Library usage example project
This commit is contained in:
31
examples/cpp/ExampleWindowsCppApp/ExampleWindowsCppApp.sln
Normal file
31
examples/cpp/ExampleWindowsCppApp/ExampleWindowsCppApp.sln
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.27130.2027
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExampleWindowsCppApp", "ExampleWindowsCppApp\ExampleWindowsCppApp.vcxproj", "{D6BC8888-0498-4BDB-AFAF-21090A39082A}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{D6BC8888-0498-4BDB-AFAF-21090A39082A}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {68E97C56-8BB2-44E4-8536-069924BC9707}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
Binary file not shown.
@@ -1,166 +1,174 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|x64">
|
<ProjectConfiguration Include="Release|x64">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{31A73533-81AA-4885-AF93-796A96540C91}</ProjectGuid>
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<ProjectGuid>{D6BC8888-0498-4BDB-AFAF-21090A39082A}</ProjectGuid>
|
||||||
<RootNamespace>libztHelloWorld</RootNamespace>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
<RootNamespace>ExampleWindowsCppApp</RootNamespace>
|
||||||
</PropertyGroup>
|
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
</PropertyGroup>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
</PropertyGroup>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
</PropertyGroup>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
</PropertyGroup>
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
</ImportGroup>
|
<ImportGroup Label="ExtensionSettings">
|
||||||
<ImportGroup Label="Shared">
|
</ImportGroup>
|
||||||
</ImportGroup>
|
<ImportGroup Label="Shared">
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
</ImportGroup>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
</ImportGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</ImportGroup>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
</ImportGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
</ImportGroup>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
</ImportGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
</ImportGroup>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
</ImportGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<PropertyGroup Label="UserMacros" />
|
</ImportGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Label="UserMacros" />
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
</PropertyGroup>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
</PropertyGroup>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
</PropertyGroup>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</PropertyGroup>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
</PropertyGroup>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
</PropertyGroup>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
</PropertyGroup>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
</PropertyGroup>
|
||||||
<ClCompile>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<PrecompiledHeader>
|
<ClCompile>
|
||||||
</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<SDLCheck>true</SDLCheck>
|
||||||
</ClCompile>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<Link>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<SubSystem>Console</SubSystem>
|
<AdditionalIncludeDirectories>C:\libzt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
</ClCompile>
|
||||||
</Link>
|
<Link>
|
||||||
</ItemDefinitionGroup>
|
<SubSystem>Console</SubSystem>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<ClCompile>
|
<AdditionalLibraryDirectories>C:\libzt\bin\lib\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<PrecompiledHeader>
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;Shlwapi.lib;zt-static.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</PrecompiledHeader>
|
</Link>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
</ItemDefinitionGroup>
|
||||||
<Optimization>Disabled</Optimization>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<ClCompile>
|
||||||
</ClCompile>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<Link>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<SubSystem>Console</SubSystem>
|
<Optimization>Disabled</Optimization>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalLibraryDirectories>C:\msys\home\ZeroTier\libzt;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</Link>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
</ItemDefinitionGroup>
|
</ClCompile>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<Link>
|
||||||
<ClCompile>
|
<SubSystem>Console</SubSystem>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<PrecompiledHeader>
|
</Link>
|
||||||
</PrecompiledHeader>
|
</ItemDefinitionGroup>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<ClCompile>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<Link>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<SubSystem>Console</SubSystem>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<SDLCheck>true</SDLCheck>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
</Link>
|
<AdditionalIncludeDirectories>C:\libzt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ItemDefinitionGroup>
|
</ClCompile>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<Link>
|
||||||
<ClCompile>
|
<SubSystem>Console</SubSystem>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<PrecompiledHeader>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
</PrecompiledHeader>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<AdditionalLibraryDirectories>C:\libzt\bin\lib\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<AdditionalDependencies>zt-static.lib;ws2_32.lib;shlwapi.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
</Link>
|
||||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
</ItemDefinitionGroup>
|
||||||
</ClCompile>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Link>
|
<ClCompile>
|
||||||
<SubSystem>Console</SubSystem>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
</Link>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
</ItemDefinitionGroup>
|
<SDLCheck>true</SDLCheck>
|
||||||
<ItemGroup>
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<Text Include="ReadMe.txt" />
|
<ConformanceMode>true</ConformanceMode>
|
||||||
</ItemGroup>
|
<AdditionalIncludeDirectories>C:\libzt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ItemGroup>
|
</ClCompile>
|
||||||
<ClInclude Include="..\..\..\..\..\..\..\msys\home\ZeroTier\libzt\src\dllmain.h" />
|
<Link>
|
||||||
<ClInclude Include="stdafx.h" />
|
<SubSystem>Console</SubSystem>
|
||||||
<ClInclude Include="targetver.h" />
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
</ItemGroup>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<ItemGroup>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<ClCompile Include="libztHelloWorld.cpp" />
|
<AdditionalDependencies>zt-static.lib;ws2_32.lib;iphlpapi.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<ClCompile Include="stdafx.cpp" />
|
<AdditionalLibraryDirectories>C:\libzt\examples\cpp\ExampleWindowsCppApp\ExampleWindowsCppApp\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</ItemGroup>
|
</Link>
|
||||||
<ItemGroup>
|
</ItemDefinitionGroup>
|
||||||
<None Include="..\..\..\..\build\mingw32_nt-6.2\libzt.dll" />
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<ClInclude Include="stdafx.h" />
|
||||||
<ItemGroup>
|
<ClInclude Include="targetver.h" />
|
||||||
<Library Include="..\..\..\..\build\mingw32_nt-6.2\libzt.lib" />
|
</ItemGroup>
|
||||||
</ItemGroup>
|
<ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<ClCompile Include="ExampleWindowsCppApp.cpp" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ClCompile Include="stdafx.cpp">
|
||||||
</ImportGroup>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,45 +1,33 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="ReadMe.txt" />
|
<ClInclude Include="stdafx.h">
|
||||||
</ItemGroup>
|
<Filter>Header Files</Filter>
|
||||||
<ItemGroup>
|
</ClInclude>
|
||||||
<ClInclude Include="stdafx.h">
|
<ClInclude Include="targetver.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="targetver.h">
|
</ItemGroup>
|
||||||
<Filter>Header Files</Filter>
|
<ItemGroup>
|
||||||
</ClInclude>
|
<ClCompile Include="stdafx.cpp">
|
||||||
<ClInclude Include="..\..\..\..\..\..\..\msys\home\ZeroTier\libzt\src\dllmain.h">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Header Files</Filter>
|
</ClCompile>
|
||||||
</ClInclude>
|
<ClCompile Include="ExampleWindowsCppApp.cpp">
|
||||||
</ItemGroup>
|
<Filter>Source Files</Filter>
|
||||||
<ItemGroup>
|
</ClCompile>
|
||||||
<ClCompile Include="stdafx.cpp">
|
</ItemGroup>
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="libztHelloWorld.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\..\build\mingw32_nt-6.2\libzt.dll" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Library Include="..\..\..\..\build\mingw32_nt-6.2\libzt.lib" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
Binary file not shown.
BIN
examples/cpp/ExampleWindowsCppApp/ExampleWindowsCppApp/stdafx.h
Normal file
BIN
examples/cpp/ExampleWindowsCppApp/ExampleWindowsCppApp/stdafx.h
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
|||||||
## libzt in C++ via DLL import
|
|
||||||
***
|
|
||||||
|
|
||||||
- Add [libzt.dll]() and [libzt.lib]() to solution as existing items.
|
|
||||||
- Place [libzt.dll](libzt.dll) in the same directory as the executable.
|
|
||||||
- Include `libzt.h` in application source.
|
|
||||||
- Access functions grlobally like so: `zts_socket(...)`
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
The Windows `.dll` and `.lib` files are provided pre-built at the above links, but if you'd like build instructions you can check out [BUILDING.md](../../BUILDING.md)
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 14
|
|
||||||
VisualStudioVersion = 14.0.25420.1
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libztHelloWorld", "libztHelloWorld\libztHelloWorld.vcxproj", "{31A73533-81AA-4885-AF93-796A96540C91}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Release|x64.Build.0 = Release|x64
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{31A73533-81AA-4885-AF93-796A96540C91}.Release|x86.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
========================================================================
|
|
||||||
CONSOLE APPLICATION : libztHelloWorld Project Overview
|
|
||||||
========================================================================
|
|
||||||
|
|
||||||
AppWizard has created this libztHelloWorld application for you.
|
|
||||||
|
|
||||||
This file contains a summary of what you will find in each of the files that
|
|
||||||
make up your libztHelloWorld application.
|
|
||||||
|
|
||||||
|
|
||||||
libztHelloWorld.vcxproj
|
|
||||||
This is the main project file for VC++ projects generated using an Application Wizard.
|
|
||||||
It contains information about the version of Visual C++ that generated the file, and
|
|
||||||
information about the platforms, configurations, and project features selected with the
|
|
||||||
Application Wizard.
|
|
||||||
|
|
||||||
libztHelloWorld.vcxproj.filters
|
|
||||||
This is the filters file for VC++ projects generated using an Application Wizard.
|
|
||||||
It contains information about the association between the files in your project
|
|
||||||
and the filters. This association is used in the IDE to show grouping of files with
|
|
||||||
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
|
|
||||||
"Source Files" filter).
|
|
||||||
|
|
||||||
libztHelloWorld.cpp
|
|
||||||
This is the main application source file.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
Other standard files:
|
|
||||||
|
|
||||||
StdAfx.h, StdAfx.cpp
|
|
||||||
These files are used to build a precompiled header (PCH) file
|
|
||||||
named libztHelloWorld.pch and a precompiled types file named StdAfx.obj.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
Other notes:
|
|
||||||
|
|
||||||
AppWizard uses "TODO:" comments to indicate parts of the source code you
|
|
||||||
should add to or customize.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
// libztHelloWorld - Simple demo with libzt.lib and libzt.dll
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
|
|
||||||
#include "..\..\..\..\include\libzt.h"
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
printf("waiting for libzt to come online...\n");
|
|
||||||
zts_startjoin("config_path", "17d709436c2c5367");
|
|
||||||
printf("started. now performing a socket call\n");
|
|
||||||
int fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
|
||||||
printf("fd=%d\n", fd);
|
|
||||||
// zts_connect(), zts_bind(), etc...
|
|
||||||
zts_stop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
// stdafx.cpp : source file that includes just the standard includes
|
|
||||||
// libztHelloWorld.pch will be the pre-compiled header
|
|
||||||
// stdafx.obj will contain the pre-compiled type information
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
||||||
// TODO: reference any additional headers you need in STDAFX.H
|
|
||||||
// and not in this file
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
// stdafx.h : include file for standard system include files,
|
|
||||||
// or project specific include files that are used frequently, but
|
|
||||||
// are changed infrequently
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "targetver.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <tchar.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: reference additional headers your program requires here
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
|
||||||
|
|
||||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
|
||||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
|
||||||
|
|
||||||
#include <SDKDDKVer.h>
|
|
||||||
Reference in New Issue
Block a user