Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:24:17+00:00 2026-06-14T13:24:17+00:00

I have a problem with passing a object to Qt Plugin and when trying

  • 0

I have a problem with passing a object to Qt Plugin and when trying to get its member using const member function i get symbol lookup error. Example:

This is inside Qt application:

class A{
    int a,b,c;
}; 

class B{
public:
    const QList<A*>* a() const { return m_a; }
private:
    QList<A*>* m_a;
};

class C{
public:
    const B* b() const { return m_b; }
private:
    B* m_b;
};

This is inside QtPlugin:

plugin.h

#include "a.h"
#include "b.h"
#include "c.h"

//....

plugin.cpp

void Plugin::somefunc(C* c)
{
    qDebug() << c->b()->a()->count();
}

If I call from Qt application somefunc() of a plugin I get symbol lookup error:

symbol lookup error ... plugin.so undefined symbol _ZNK5b6a

but if I put B and C class members into public domain it works using:

    qDebug() << c->m_b->m_a->count();

Did anyone have similar problem or knows how to solve this? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:24:19+00:00Added an answer on June 14, 2026 at 1:24 pm

    There are two solutions to this “problem”.

    • Make shared library – make shared library and move code that application and QtPlugin use into that library
    • Add .h and .cpp of files used to QMake file – header and source files of application used in QtPlugin add to HEADERS and SOURCES directive in .pro file – this is actually static linking

    I haven’t found similar question on web, and thus putting this answer. Maybe question was fuzzy, sorry about that. Thanks for answer. This answer is for any future reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with passing an argument to my simple function in jQuery: When
I have this problem with Cocoa, I am calling a function and passing an
I have an interesting problem with the TempData object not passing values to another
I have problem with passing email fetched with Net::IMAP library to Mail object defined
The Dropdownlist data binding using throw common function. In this have a problem in
I have a problem with Javascript forcing the [object DOMWindow] into an function I
I have a problem with passing an anonymous object as an argument in a
I seem to have a problem passing some strings on from one form to
I'm very new to C++ and I have a problem passing a vector of
I have a problem with passing variables as reference in PHP. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.