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

  • Home
  • SEARCH
  • 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 6589447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:10:36+00:00 2026-05-25T17:10:36+00:00

First, this is being built on Linux. We have an API that is based

  • 0

First, this is being built on Linux.

We have an API that is based on wxObjects (we do not use the GUI objects). Our classes are defined as follows:

#include <wx/wx.h>

class apibaseclass : public wxObject
{
    apibaseclass();
    ~apibaseclass();
}

About five years ago this compiled and linked just fine. I’ve been asked to make changes and now I get the following error:

undefined reference to wxObject::wxObject()'/home/lloyd/Projects/wxtestprogram/main.cpp:7: undefined reference towxObject::wxObject()’

This is the program I was using as a sanity test:

#include <iostream>
#include <wx/wx.h>

class blah : public wxObject
{
public:
int x;

blah();
virtual ~blah();

void setvalue(int value);
int getvalue();
};

blah::blah()
{
}


blah::~blah()
{
}

void blah::setvalue(int value)
{
    x = value;
}

int blah::getvalue()
{
    return x;
}


using namespace std;

int main()
{
    class blah *testvalue = new blah();

    testvalue->setvalue(15);

    wxPrintf(wxT("Hello World 2 %d\r\n"), testvalue->getvalue());

    wxString str1 = wxT("Linux");

    wxString str2 = wxT("Operating");

    wxString str3 = wxT("System");

    wxString str;
    str = str1 + wxT(" ") + str2 + wxT(" ") + str3;

    wxPuts(str);
    wxPrintf(wxGetHomeDir());


    long int mem = wxGetFreeMemory();

    wxPrintf(wxT("Memory: %ld\n"), mem);
    return 0;
}

What is bothersome is that if I replace “public wxObject” with “public wxString” then it links just fine. Why am I unable to access wxObject?!?

NOTE: I’ve never linked against anything other than libwx_baseu-2.6.so in the past. And in fact when I build without the GUI it only builds libwx_baseu-2.6, libwx_baseu_net-2.6 and libwx_baseu_xml-2.6.

What do I need to do to get things building and LINKING again with minimal muss and fuss?

  • 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-25T17:10:36+00:00Added an answer on May 25, 2026 at 5:10 pm

    Using

    wx-config --cxxflags --libs base 
    

    gave me the missing items that allowed me to build the project correctly. No doubt this is what I used five years ago.

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

Sidebar

Related Questions

I have our first NodeJS server that's being deployed to a client server along
Using Dozer to map two objects, I have: /** /* This first class uses
I have come to Grails without first being a Spring developer. This is great
I have built a WCF Service that is being consumed by a Silverlight app.
When I first heard about StackOverflow, and heard that it was being built in
I have an app that's built for Android 2.2, so I'm not using the
first of all: this is not the same as this . The ModelBackend has
I have a legacy web-site that I am maintaining (built mostly in classic ASP
I'm just getting my feet wet with Android and have built a UI that
In C#, is there any built-in way to correct URLs that have parent pathing

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.