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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:55:01+00:00 2026-06-06T10:55:01+00:00

I wonder the difference of import and include in Object-c By the way, I

  • 0

I wonder the difference of import and include in Object-c

By the way, I am not clear about the difference of dynamic and static linking.

If I use a library with static linking,
is that mean I copy the code i need from library for my program and link with them?
Then my program can work with the code from library.

If i use a library with dynamic linking,
is that mean I only reference the code i need from library to my program when my program is running.
Then my program can work with the “reference code”.

  • 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-06-06T10:55:04+00:00Added an answer on June 6, 2026 at 10:55 am

    #import vs. #include and static vs. dynamic linking are two completely unrelated topics.

    #include includes the contents of a file directly in another file, and is available in C (and therefore also in Objective-C). However, it’s common to want to include the contents of a file only if that file hasn’t already been included. (You don’t, for example, want to declare the same variables twice; it’d cause compiler errors!) That’s why #import was added in Objective-C; it does exactly that: includes the contents of a file only if that file hasn’t already been #imported. If you’re not sure what to use, you should probably be using #import.

    Static vs. dynamic linking is completely different–linking happens after compilation, so it couldn’t possibly be related to #import and #include, which are part of the source code. Your thoughts on linking are exactly correct, however–statically linked libraries are included in your app, and your users don’t need them. Dynamically linked libraries are referenced, and must be present on your users’ machines for your app to run.

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

Sidebar

Related Questions

i wonder what the difference between a library and a plugin is? if a
I wonder about the difference between different data types in SQL Server to store
Wonder what the difference between: static PROCESSWALK pProcess32First=(PROCESSWALK)GetProcAddress(hKernel,Process32First); ... pProcess32First(...); what is hKernel? Look
I wonder about the difference between creating a camera class and GLU.gluLookAt function in
so wonder is it need to be the same picture? it can use difference
I wonder why this works strange. I understand that the difference is grouping, but
Whenever I ask people about the difference between an API and a library, I
I wonder when saving plot into image file in matlab, what is the difference
Every time I create a table I wonder if there is any performance difference
I'm quite new to Oracle's ADF and wonder what is the difference between ADF

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.