summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgenjix <genjix@gmail.com>2014-04-09 03:37:17 (GMT)
committer genjix <genjix@gmail.com>2014-04-09 03:37:17 (GMT)
commit2264608e3bd0e656f716947be83ef8f1cb65e505 (patch)
treecd9e8753c8a482a4ae711a0495061f1c8e4ca558
parent116f4ffe87dd0cfd9795873e81d3d3f0f8b95709 (diff)
parentd93eeeb25a64543f5a6bf5c34ab1f682fde312e3 (diff)
Merge pull request #43 from evoskuil/master
Add define.hpp to VS project, modify dynamic/static symbol names.
-rw-r--r--builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj1
-rw-r--r--builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj.filters3
-rw-r--r--builds/msvc/vs2013/properties/Common.props2
-rw-r--r--builds/msvc/vs2013/properties/Debug.props1
-rw-r--r--builds/msvc/vs2013/properties/DynamicDebug.props1
-rw-r--r--builds/msvc/vs2013/properties/LinkTimeCodeGeneration.props3
-rw-r--r--builds/msvc/vs2013/properties/StaticDebug.props1
-rw-r--r--builds/msvc/vs2013/properties/StaticDebugLinkTimeCodeGeneration.props1
-rw-r--r--include/bitcoin/define.hpp17
9 files changed, 15 insertions, 15 deletions
diff --git a/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj b/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj
index 1482d5a..b7ff081 100644
--- a/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj
+++ b/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj
@@ -289,6 +289,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\blockchain\leveldb_blockchain.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\blockchain\organizer.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\constants.hpp" />
+ <ClInclude Include="..\..\..\..\include\bitcoin\define.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\error.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\format.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\getx_responder.hpp" />
diff --git a/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj.filters b/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj.filters
index 7a44d3d..d61a6f4 100644
--- a/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj.filters
+++ b/builds/msvc/vs2013/libbitcoin/libbitcoin.vcxproj.filters
@@ -319,6 +319,9 @@
<ClInclude Include="..\..\..\..\src\blockchain\database\mman_win32.h">
<Filter>src\blockchain\database</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\..\include\bitcoin\define.hpp">
+ <Filter>include</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
diff --git a/builds/msvc/vs2013/properties/Common.props b/builds/msvc/vs2013/properties/Common.props
index 10e0380..79b0b6c 100644
--- a/builds/msvc/vs2013/properties/Common.props
+++ b/builds/msvc/vs2013/properties/Common.props
@@ -11,7 +11,7 @@
<ItemDefinitionGroup>
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
- <!-- Windows and CRT definitions for unicode. Note that Linux only supports unicode so char is UCS-16. -->
+ <!-- Windows and CRT definitions for unicode. Note that Linux only supports unicode so char is 16 bit. -->
<PreprocessorDefinitions>UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
diff --git a/builds/msvc/vs2013/properties/Debug.props b/builds/msvc/vs2013/properties/Debug.props
index 825321a..7f060f4 100644
--- a/builds/msvc/vs2013/properties/Debug.props
+++ b/builds/msvc/vs2013/properties/Debug.props
@@ -7,7 +7,6 @@
<!-- RootNamespace is used to deconflict output files from differing project versions. -->
<IntDir>$(ProjectDir)..\..\..\..\obj\$(PlatformName)\$(Configuration)\$(RootNamespace)\</IntDir>
<OutDir>$(ProjectDir)..\..\..\..\bin\$(PlatformName)\Debug\$(RootNamespace)\</OutDir>
- <LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
diff --git a/builds/msvc/vs2013/properties/DynamicDebug.props b/builds/msvc/vs2013/properties/DynamicDebug.props
index 81befdc..0395433 100644
--- a/builds/msvc/vs2013/properties/DynamicDebug.props
+++ b/builds/msvc/vs2013/properties/DynamicDebug.props
@@ -15,6 +15,7 @@
<ClCompile>
<!-- Linking CRT dynamically when building a dynamic library is conventional. -->
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <LinkIncremental>true</LinkIncremental>
</ClCompile>
</ItemDefinitionGroup>
diff --git a/builds/msvc/vs2013/properties/LinkTimeCodeGeneration.props b/builds/msvc/vs2013/properties/LinkTimeCodeGeneration.props
index 42708b5..338a970 100644
--- a/builds/msvc/vs2013/properties/LinkTimeCodeGeneration.props
+++ b/builds/msvc/vs2013/properties/LinkTimeCodeGeneration.props
@@ -9,9 +9,6 @@
<ItemDefinitionGroup>
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
-
- <!-- This overrides Debug.props->LinkIncremental and therefore this reference must always be set after Debug.props is included. -->
- <LinkIncremental>false</LinkIncremental>
</ClCompile>
<Link>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
diff --git a/builds/msvc/vs2013/properties/StaticDebug.props b/builds/msvc/vs2013/properties/StaticDebug.props
index f0693f1..b5e5ba9 100644
--- a/builds/msvc/vs2013/properties/StaticDebug.props
+++ b/builds/msvc/vs2013/properties/StaticDebug.props
@@ -15,6 +15,7 @@
<ClCompile>
<!-- Linking CRT statically when building a static library is conventional. -->
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <LinkIncremental>true</LinkIncremental>
</ClCompile>
</ItemDefinitionGroup>
diff --git a/builds/msvc/vs2013/properties/StaticDebugLinkTimeCodeGeneration.props b/builds/msvc/vs2013/properties/StaticDebugLinkTimeCodeGeneration.props
index 18b017c..ae5f350 100644
--- a/builds/msvc/vs2013/properties/StaticDebugLinkTimeCodeGeneration.props
+++ b/builds/msvc/vs2013/properties/StaticDebugLinkTimeCodeGeneration.props
@@ -15,6 +15,7 @@
<ClCompile>
<!-- Linking CRT statically when building a static library is conventional. -->
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <LinkIncremental>false</LinkIncremental>
</ClCompile>
</ItemDefinitionGroup>
diff --git a/include/bitcoin/define.hpp b/include/bitcoin/define.hpp
index 1d506a7..3c4b958 100644
--- a/include/bitcoin/define.hpp
+++ b/include/bitcoin/define.hpp
@@ -45,18 +45,15 @@
// DLL exports (or does nothing for static build)
// BC_INTERNAL is used for non-api symbols.
-#ifdef BC_DLL
- #ifdef BC_DLL_EXPORTS
- // Being compiled as a DLL (instead of using it)
- #define BC_API BC_HELPER_DLL_EXPORT
- #else
- #define BC_API BC_HELPER_DLL_IMPORT
- #endif
- #define BC_INTERNAL BC_HELPER_DLL_LOCAL
-#else
- // BC_DLL is not defined: this means this is a static lib.
+#if defined BC_STATIC
#define BC_API
#define BC_INTERNAL
+#elif defined BC_DLL
+ #define BC_API BC_HELPER_DLL_EXPORT
+ #define BC_INTERNAL BC_HELPER_DLL_LOCAL
+#else
+ #define BC_API BC_HELPER_DLL_IMPORT
+ #define BC_INTERNAL BC_HELPER_DLL_LOCAL
#endif
#endif