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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:43:48+00:00 2026-05-25T14:43:48+00:00

I’ve read that, the objective-c programs need objective-c runtime to run. AFAIK, both C/C++

  • 0

I’ve read that, the objective-c programs need objective-c runtime to run.

AFAIK, both C/C++ programs don’t require any runtime environments to run. as the generated binary code is being executed directly by the underlying OS.

So this means that Objective-c programs require a redundant layer to run, correct? and If so, is this layer seems like Java VM and .net runtime or seems like Qt runtime (in flavor of some additional libraries)?

EDIT:
After some read, I found that, the objc compiler generates some more information in the generated compiled code that is responsible of many things such as method passing (objc_sendMsg(), introspection and others)

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-05-25T14:43:48+00:00Added an answer on May 25, 2026 at 2:43 pm

    The compiled code is native but you need an additional library (the runtime) which does all the object and message handling (lookup, invocation etc.). There is no virtual machine involved. So it is more like QT than Java runtime.

    [Update]

    Since the C++ message binding behaviour is not obvious to programmers of more dynamic OO languages (e.g.: Objective-C or Smalltalk) – like me – I wrote a small C++ test app which demonstrates the effect of the virtual keyword on the choice of the method to call.

    #include <iostream>
    
    class Test1 {
    public:
        Test1();
        void test1();
        void test2();
    };
    
    class Test2 : Test1 {
    public:
        Test2();
        void test1();
        void test2();
    };
    
    Test1::Test1() {}
    void Test1::test1() { std::cout << "T1:t1" << std::endl; }
    void Test1::test2() { std::cout << "T1:t2" << std::endl; }
    
    Test2::Test2() {}
    void Test2::test1() { std::cout << "T2:t1" << std::endl; }
    void Test2::test2() { std::cout << "T2:t2" << std::endl; }
    
    int main(int argc, char **argv)
    {
        Test1 *t11 = new Test1();
        Test1 *t12 = (Test1 *)(new Test2());
        Test2 *t2 = new Test2();
    
        t11->test1();
        t11->test2();
    
        t12->test1();
        t12->test2();
    
        t2->test1();
        t2->test2();
    
        return 0;
    }
    

    An Objective-C programmer would expect a output of

    T1:t1
    T1:t2
    T2:t1
    T2:t2
    T2:t1
    T2:t2
    

    since t12 is actually a Test2 which was casted to Test1.
    The actual output is

    T1:t1
    T1:t2
    T1:t1
    T2:t2
    T2:t1
    T2:t2
    

    because C++ (by default, i.e. without virtual) statically binds the call to test1 based on the type it knows at compile time which is Test1 (due to the cast).

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I need to clean up various Word 'smart' characters in user input, including but
I am writing an app with both english and french support. The app requests
I'm looking for suggestions for debugging... If you view this site in Firefox or
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.