abseil / abseil/abseil-cpp

use vcpkg install absl dll lib link error

Đang mở
#1,705 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
18.1k
Fork
3.2k
Merge trung bình
20 giờ 36 phút
Pull request đã merge (30 ngày)
1

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.