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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:23:39+00:00 2026-05-25T15:23:39+00:00

I am trying to compile the livemedia libraries as a shared object, so I

  • 0

I am trying to compile the livemedia libraries as a shared object, so I get the following .so:

  • libBasicUsageEnvironment.so
  • libgroupsock.so
  • libliveMedia.so
  • libUsageEnvironment.so

It seems to be good, but when I try to link against these libraries, I get a lot of errors of undefined reference to the virtual functions they use.

For what I understood so far, if in a class a virtual method is defined as

class MyClass
{
   ...
   virtual myMethod (int arg) {...};
   ...
}

the method is correctly found and linked, but if the code is split in a .h file

class MyClass

{
   ...
   virtual myMethod (int arg);
   ...
}

and in a .cpp file

MyClass::myMethod (int arg)
{
...
}

it does not work any more.

Now, I admit I’m far from being a C++ guru, but why does this happen? Is it a bug of g++? Or is there some hidden feature of the language? If I compile it as a static library is works.

  • 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-25T15:23:40+00:00Added an answer on May 25, 2026 at 3:23 pm

    It is not a compiler bug. It indicates that the function definitions are found in the library .so rather than the header, which further implies that you are not linking correctly.

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

Sidebar

Related Questions

I'm trying to compile the following Objective-C program on Ubuntu Hardy, but for some
Trying to compile a unity3d project in xcode but i'm getting the following compile
When trying to compile the following file in xcode: http://openkinect.org/wiki/C%2B%2BOpenCvExample I get these errors:
I am trying to compile my source code into a library but i get
I'm trying to compile an old project using VS express 2010 but I get
When trying to compile a file that include winnt.h via windows.h, I get the
When trying to compile my class I get an error: The constant 'NamespaceName.ClassName.CONST_NAME' cannot
When trying to compile the following code, I am getting a warning that line
When trying to compile the following code in LINQPad : void Main() { DriveInfo.GetDrives().Select(GetProviderName).Dump();
Im trying to compile but im getting these errors: 1>.\item.cpp(123) : warning C4800: 'int'

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.