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 6635049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:00:11+00:00 2026-05-25T23:00:11+00:00

I am using Qt 4.7.2 under Fedora 14. I have a working library of

  • 0

I am using Qt 4.7.2 under Fedora 14.

I have a working library of custom widgets which I am trying to integrate into Qt Designer.
There is a simple widget base class, then some more complex widgets inheriting from it.
The simple widget integrates fine, but I have a problem with the more complex ones.

The problem comes from the fact that that the more complex ones require a special structure to be passed to them on creation. So my code for creating a complex widget in the plugin is:

QWidget *myPlugin::createWidget(QWidget *parent)
{
    my_struct *xyz = new my_struct;
    return new myWidget("MyWidget",xyz, parent);
}

my_struct is just a simple C style struct with ints, doubles and arrays.

Then when I start Qt Designer with this plugin I get:

/usr/lib64/qt4/bin/designer: symbol lookup error: /usr/lib64/qt4/plugins/designer/libMyPlugin.so: undefined symbol: _ZN8MyWidgetC1E7QStringP17my_structP7QWidget

I am building a release version of the plugin, not a debug version.

I also tried defining xyz as a static class variable in the plugin and just passing its address to the constructor, but I still get the same error.

I also tried adding xyx as an unused static class variable to my simple widget and that does not give the error, so the error seems to be coming from the call to the myWidget constuctor.

Can anyone help me resolve this?


Thanks Arne,

You were right.

I added my library explicitly to the plugin’s .pro file and then it worked.

What puzzles me is how could I build the plugin with no errors without the library?
And why did my simple widget work without the library?

  • 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-05-25T23:00:11+00:00Added an answer on May 25, 2026 at 11:00 pm

    The error message looks as if the linker did not find a definition for the constructor myWidget(QString, my_struct*, QWidget*). Have you added the relevant source file to your release build? Do you actually have a definition for this constructor? It is also possible that you have to exchange the object file linking order. I have seen this with larger projects in the past, so I wouldn’t be too surprised. The object file containing the definition needs to be stated before the one using the definition.

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

Sidebar

Related Questions

I'm using g++ under Fedora to compile an openGL project, which has the line:
I have tried to create a custom-painted icon using QT under window. The following
I m using Rstudio under Win7. Is there a way that knitr automatically escape
I'm trying to convert a local SVN repository to git using git-svn under cygwin
On Linux under X11 and using GTK+ you have something called Main Loop. Once
Hi I am using Fedora 10 linux. I have created an rpm for my
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
I'm using Indy10 under Delphi2009. I have a server/client application, with TidTCPServer and TidTCPClient.
I am using libxml2 under python. Unfortunatly the python version of this library is
I am developing a shared library using C++ under Linux, and I would like

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.