Skip to content

Commit 62b189b

Browse files
committed
Merge #17899: msvc: Ignore msvc linker warning and update to msvc build instructions.
0874a10 Ignore msvc linker warning and update to msvc build instructions. (Aaron Clauson) Pull request description: - Update Visual Studio instructions. - Remove x64 platform conditional from bitcoin-qt project configuration. - Set use native environment toolset to fix linker warning. - Ignore linker warning about precompiled type information missing for test_bitcoin_qt. ACKs for top commit: fanquake: ACK 0874a10 - tested building `bitcoind` and `bitcoin-qt`. Didn't open anything in Visual Studio. Tree-SHA512: 83a4e4dfb8a52b024feadbf06bb1bf87993b6ebcb2a1b7dc3e2385815400f0beffc43591408b4abc8b6ffa406ce066c0af5028e7f53c707dca88ea5bba18346c
2 parents e7f8450 + 0874a10 commit 62b189b

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

build_msvc/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Quick Start
1212
The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections.
1313

1414
```
15-
vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent zeromq berkeleydb rapidcheck double-conversion
15+
vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] rapidcheck zeromq double-conversion
1616
py -3 build_msvc\msvc-autogen.py
1717
msbuild /m build_msvc\bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
1818
```
@@ -41,7 +41,9 @@ Qt
4141
---------------------
4242
In order to build the Bitcoin Core a static build of Qt is required. The runtime library version (e.g. v141, v142) and platform type (x86 or x64) must also match.
4343

44-
A prebuilt version of Qt can be downloaded from [here](https://github.com/sipsorcery/qt_win_binary/releases). Please be aware this download is NOT an officially sanctioned Bitcoin Core distribution and is provided for developer convenience. It should NOT be used for builds that will be used in a production environment or with real funds.
44+
Some prebuilt x64 versions of Qt can be downloaded from [here](https://github.com/sipsorcery/qt_win_binary/releases). Please be aware these downloads are NOT officially sanctioned by Bitcoin Core and are provided for developer convenience only. They should NOT be used for builds that will be used in a production environment or with real funds.
45+
46+
To determine which Qt prebuilt version to download open the `.appveyor.yml` file and note the `QT_DOWNLOAD_URL`. When extracting the zip file the destination path must be set to `C:\`. This is due to the way that Qt includes, libraries and tools use internal paths.
4547

4648
To build Bitcoin Core without Qt unload or disable the `bitcoin-qt`, `libbitcoin_qt` and `test_bitcoin-qt` projects.
4749

@@ -64,18 +66,20 @@ PS >py -3 msvc-autogen.py
6466

6567
- An optional step is to adjust the settings in the build_msvc directory and the common.init.vcxproj file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set.
6668

67-
- Build with Visual Studio 2017 or msbuild.
69+
- To build from the command line with the Visual Studio 2017 toolchain use:
6870

6971
```
7072
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v141 /t:build
7173
```
7274

73-
- Build with Visual Studio 2019 or msbuild.
75+
- To build from the command line with the Visual Studio 2019 toolchain use:
7476

7577
```
7678
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
7779
```
7880

81+
- Alternatively open the `build_msvc\bitcoin.sln` file in Visual Studio.
82+
7983
AppVeyor
8084
---------------------
8185
The .appveyor.yml in the root directory is suitable to perform builds on [AppVeyor](https://www.appveyor.com/) Continuous Integration servers. The simplest way to perform an AppVeyor build is to fork Bitcoin Core and then configure a new AppVeyor Project pointing to the forked repository.

build_msvc/bitcoin-qt/bitcoin-qt.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</ProjectReference>
5151
</ItemGroup>
5252

53-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
53+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
5454
<ClCompile>
5555
<AdditionalIncludeDirectories>$(QtIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
5656
</ClCompile>
@@ -64,7 +64,7 @@
6464
</ResourceCompile>
6565
</ItemDefinitionGroup>
6666

67-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
6868
<ClCompile>
6969
<AdditionalIncludeDirectories>$(QtIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
7070
</ClCompile>

build_msvc/common.init.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<VCProjectVersion>16.0</VCProjectVersion>
77
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
88
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
9+
<UseNativeEnvironment>true</UseNativeEnvironment>
910
</PropertyGroup>
1011

1112
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and !Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.props')">

build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,23 @@
6767
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
6868
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
6969

70-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
7171
<ClCompile>
7272
<AdditionalIncludeDirectories>..\libbitcoin_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
7373
</ClCompile>
7474
<Link>
7575
<AdditionalDependencies>$(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
76+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
7677
</Link>
7778
</ItemDefinitionGroup>
7879

79-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
80+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
8081
<ClCompile>
8182
<AdditionalIncludeDirectories>..\libbitcoin_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
8283
</ClCompile>
8384
<Link>
8485
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
86+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
8587
</Link>
8688
</ItemDefinitionGroup>
8789
<ItemGroup>

0 commit comments

Comments
 (0)