abseil / abseil/abseil-cpp

use vcpkg install absl dll lib link error

オープン
#1,705 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
18.1k
フォーク
3.2k
平均マージ
20時間 36分
マージ済み PR(30日)
1

説明

### Describe the issue

txsim-coordinator.lib(sensor_catalog_parser.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)
3>txsim-coordinator.lib(traffic_parser.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)
3>txsim-coordinator.lib(coordinator.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)
3>txsim-coordinator.lib(settings.pb.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)
3>txsim-coordinator.lib(scene_sensor_group.pb.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)
3>txsim-coordinator.lib(scene_infrastructure_group.pb.obj) : error LNK2001: 无法解析的外部符号 "private: static void const * const absl::lts_20240116::hash_internal::MixingHashState::kSeed" (?kSeed@MixingHashState@hash_internal@lts_20240116@absl@@0QEBXEB)

### Steps to reproduce the problem

cmake already
find_package(absl CONFIG REQUIRED)
link with lib:absl::any absl::log absl::base absl::bits absl::hash absl::strings

### What version of Abseil are you using?

{
"name": "abseil",
"version": "20240116.2",
"port-version": 2,
"description": [
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
"Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole."
],
"homepage": "https://github.com/abseil/abseil-cpp",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"cxx17": {
"description": "Enable compiler C++17."
}
}
}

### What operating system and version are you using?

win11

### What compiler and version are you using?

vs2022 build x64

### What build system are you using?

windows

### Additional context

vcpkg install absl and link protobuf code error.compile success but link error."
I already define ABSL_CONSUME_DLL
I can find kSeed in abseil_dll.lib
![image](https://github.com/abseil/abseil-cpp/assets/12134859/8b1e0364-8189-40fb-b6d3-da2e95553b9c)
I guess maybe link with abseil_hash.lib but i can't find out in vcpkg install result.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。