Skip to content

Error LNK2001: unresolved external symbol  #319

Description

Hello! I'm currently experiencing some Issues with InlineQuery...

My Code:

        bot.getEvents().onInlineQuery([&bot](const InlineQuery::Ptr& query) {

            std::vector<InlineQueryResult::Ptr> results;
            InlineQueryResultArticle::Ptr article(new InlineQueryResultArticle);

            auto text = InputTextMessageContent();
            text.messageText = "Inline Test";

            article->title = "Inline Title!";
            article->id = "1234";
            article->type = "article";
            results.push_back(article);

            bot.getApi().answerInlineQuery(query->id, results);
            });

Errors in Visual Studio:

1>main.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const TgBot::InlineQueryResultArticle::TYPE" (?TYPE@InlineQueryResultArticle@TgBot@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B).
1>main.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const TgBot::InputTextMessageContent::TYPE" (?TYPE@InputTextMessageContent@TgBot@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B).

I don't actually know if My Issue is about My code, to be honest... I tried do anything to fix that, but Issue still persists.
Used tgbot-cpp Version (via vcpkg): 1.7.3.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions