How can i call a function outside of the current project?

Discussion in 'C Programming' started by Emerson, Jan 5, 2005.

  1. Emerson

    Emerson Guest

    I mean how can i call a function which is in another project?
    Should i build the function into a libary or something like .dll? And how?
    Thank you so much.

    --
    Emerson
     
    Emerson, Jan 5, 2005
    #1
    1. Advertising

  2. Emerson

    infobahn Guest

    Emerson wrote:
    >
    > I mean how can i call a function which is in another project?


    The meaning of the word "project" is not defined by C, but I guess
    you mean that you'd like to learn how to build and use libraries.

    > Should i build the function into a libary or something like .dll? And how?


    Yes, you should.

    You may find that Googling for "what is a library? what are they for?"
    yields useful information.
     
    infobahn, Jan 5, 2005
    #2
    1. Advertising

  3. Emerson

    CBFalconer Guest

    Emerson wrote:
    >
    > I mean how can i call a function which is in another project?
    > Should i build the function into a libary or something like
    > .dll? And how?


    There is no such thing as a dll or a project in the C language.
    There is a provision for a "compilation unit", and after that
    virtually all systems provide for linking separate object modules,
    which have been created from a compilation unit (essentially the
    source file and anything included in it). libraries and dlls are a
    means of storing such object modules (not defined in C) until an
    appropriate time for linking. That time may be at runtime (dynamic
    linking). All these variants are system specific and are not
    specified by the language, and are thus off-topic here.

    Read the documentation on your particular compiler/linker and/or
    your make utility (which in turn may be hidden inside an IDE
    masquerading as a project). Go to a newsgroup dealing with your
    particular system for more accurate advice on that system.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Jan 5, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    814
    Craig Deelsnyder
    Aug 16, 2004
  2. Sandeep Chikkerur
    Replies:
    1
    Views:
    737
    Jack Klein
    Nov 18, 2003
  3. Fabiano Sidler
    Replies:
    0
    Views:
    316
    Fabiano Sidler
    Oct 23, 2006
  4. Krzysztof Poc

    outside type, outside function

    Krzysztof Poc, Feb 3, 2012, in forum: C++
    Replies:
    1
    Views:
    300
    Victor Bazarov
    Feb 7, 2012
  5. Bernard
    Replies:
    0
    Views:
    112
    Bernard
    Sep 22, 2006
Loading...

Share This Page