4

次の手順を使用して、Visual Studio の x64 ターミナルでブーストを構築しようとしています: https://www.boost.org/doc/libs/1_62_0/more/getting_started/windows.html#get-boost

そうです:

boostrap

それから

.\b2 address-model=64

しかし、それは常に言います:

C:\boost_1_70_0>.\b2 address-model=64
Performing configuration checks

    - default address-model    : 32-bit
    - default architecture     : x86

Building the Boost C++ Libraries.

...

そして、すべての 32 ビット バージョンをビルドします。私がこれを知っているのは、CMake のようなものにブーストを使用しようとすると、32 ビットであると不平を言うからです。

C:\src\SimpleAmqpClient\simpleamqpclient-build>cmake -DBOOST_ROOT=C:\boost_1_70_0 -DBOOST_LIBRARYDIR=C:\boost_1_70_0\stage\lib ..
-- Found Boost 1.70.0 at C:/Program Files/boost/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS chrono;system
-- Found boost_headers 1.70.0 at C:/Program Files/boost/lib/cmake/boost_headers-1.70.0
-- Found boost_chrono 1.70.0 at C:/Program Files/boost/lib/cmake/boost_chrono-1.70.0
-- No suitable boost_chrono variant has been identified!
--   libboost_chrono-mgw82-mt-d-x32-1_70.a (32 bit, need 64)
--   libboost_chrono-mgw82-mt-x32-1_70.a (32 bit, need 64)
CMake Error at C:/Program Files/boost/lib/cmake/Boost-1.70.0/BoostConfig.cmake:95 (find_package):
  Found package configuration file:

    C:/Program Files/boost/lib/cmake/boost_chrono-1.70.0/boost_chrono-config.cmake

  but it set boost_chrono_FOUND to FALSE so package "boost_chrono" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

Call Stack (most recent call first):
  C:/Program Files/boost/lib/cmake/Boost-1.70.0/BoostConfig.cmake:124 (boost_find_dependency)
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:273 (find_package)
  CMakeLists.txt:35 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "C:/src/SimpleAmqpClient/simpleamqpclient-build/CMakeFiles/CMakeOutput.log".

ええ、どうすれば 64 ビットをビルドできますか?

4

3 に答える 3

0

私はちょうどこの問題に遭遇しました。コマンド ラインで指定address-model=64したのに、32 ビット ツールは含まれておらずPATH、64 ビット ツールは含まれていましたが、Jam は 32 ビット ツールを使用していました。そして、自分がそれを行っていることさえ知りませんでしたx64。見つけて呼び出すのに苦労した 32 ビット ツールを使用して作成した 32 ビット ライブラリの名前を入力しました。私は「スマート」ビルド システムが大好きです。

なぜそうなったのかはわかりませんが、行の前に編集bin.v2\standalone\msvc\msvc-{version}\address-model-64\architecture-x86\msvc-setup.batして移動することで回避しました。...\bin\Hostx64\x64...\bin\HostX86\x86SET PATH=...

別の回答で述べたように、64ビットバイナリを正しく構築している場合でも、「デフォルトのアドレスモデル:32ビット」と報告されます。

于 2020-09-29T00:20:40.670 に答える