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

E

Emerson

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.
 
I

infobahn

Emerson said:
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.
 
C

CBFalconer

Emerson said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top