Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How can i call a function outside of the current project?

Reply
Thread Tools

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

 
 
Emerson
Guest
Posts: n/a
 
      01-05-2005
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


 
Reply With Quote
 
 
 
 
infobahn
Guest
Posts: n/a
 
      01-05-2005
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.
 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      01-05-2005
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 ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
outside type, outside function Krzysztof Poc C++ 1 02-07-2012 04:06 PM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
nat from outside to outside dt1649651@yahoo.com Cisco 1 08-21-2005 04:26 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM



Advertisments