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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:41:57+00:00 2026-05-21T10:41:57+00:00

I have been running into strange linking behavior with g++, however, I’m just a

  • 0

I have been running into strange linking behavior with g++, however, I’m just a student, and I was wondering if this was normal.

I am trying to link assembly code (machine: fedora 14 gnome 32bits x86 i686 intel i7) with c++ code and to have the assembly code call a method from a fonction instanciated in the c++ file. It seems that implementing a method in the class declaration will prevent it from being put in the linker table unless it’s used at least once in the original source.

class A
{
public:
    void showSUP() {
        cout<<"sup";
    }
};

After instanciating A, you will not be able to call _ZN1A7showSUPEv because it has not been put in the linking table:

call _ZN1A7showSUPEv

However, if you call A::showSUP() in the same .cpp as A was declared, then calling it from a seperate assembly file will work.

With (and instantiation of A)

class A
{
    void showSUP();
};

A::showSUP()
{
    cout<<"sup";
}

Calling _ZN1A7showSUPEv will work.

My question is, why doesn’t the first example work.

Thank you all in advance.

  • 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-21T10:41:57+00:00Added an answer on May 21, 2026 at 10:41 am
    • For inlined functions the compiler
      will only output code where the function is used.
    • Functions defined
      inside the class definition are
      inline (usually).
    • The function isn’t
      used.
    • Therefore: no function in the
      binary.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to learn Erlang and have been running into some problems
I have been running into OutOfMemory Exceptions while trying to load an 800MB text
We have been running into an issue where we get this error message when
I've been running into an EXC_BAD_ACCESS bug and have been racking my brain trying
I having been running into some strange problems with a webpage that I have
So I have been running into all kinds of interesting problems in VisualStudio 2008
This is a bit of a vague notion which I have been running over
I have been running into some issues with animating multiple CALayers at the same
I have been running into errors where objects are somehow freed but we end
I have been running into issues with OpenGL rendering on different computers: Works: Intel

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.