eclipse-paho / eclipse-paho/paho.mqtt.cpp

LNK2001 error occurred after update version from V1.5.0 to V1.5.2 via vcpkg

Open
#552 13 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

I have a question about this update.
After I installed paho-mqttpp3@1.5.2 via vcpkg, When building using libraries installed in VS, the following error occurs.

unresolved external symbol "private: static class std::basic_string const mqtt::message::EMPTY_STR" (?EMPTY_STR@message@mqtt@@0V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@b)

I had checked EMPTY_STR exist in massages.cpp/massages.h.

How do I fix it?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the VS build with paho-mqttpp3@1.5.2 installed through vcpkg and inspect messages.cpp and messages.h, where the issue reports that EMPTY_STR exists. Trace the unresolved mqtt::message::EMPTY_STR symbol through the library build and linking; done means the sample build links without LNK2001.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.