all groups > visual c libraries > december 2003 >
You're in the

visual c libraries

group:

Linking Custom Function Libraries to Program


Linking Custom Function Libraries to Program Alex Resnik
12/23/2003 6:23:05 PM
visual c libraries:
Hi,

I have a question on how to link a custom function
library to my program without making it part of my
program work space. I am running windows XP on a PIII
machine and using VC++ 2003 and I am writing C Win32
Console programs. Is there a particular directory I need
to save my library to?

Thank you,

Re: Linking Custom Function Libraries to Program David Lowndes
12/24/2003 10:06:55 AM
[quoted text, click to view]

Alex,

Your stated requirement is a bit ambiguous. Do you consider adding a
reference to your .lib file in your project's linker input setting as
making the library part of your workspace? If not, then put the .lib
file wherever is most logical for you and add a reference to it in
your project's linker input setting.

Merry Christmas
Dave
--
Re: Linking Custom Function Libraries to Program Alex Resnik
12/24/2003 12:10:58 PM
David,

Let me try to explain what a want to do again. I have two
files "Tools.h and Tools.c". They are the header and
source files for some custom functions that I want to use
in my programs. I already know that I need to put the
header file in my "include" directory so that the
compiler knows where to find it. Now I want to tell the
linker to use the compiled version of "Tools.c" file when
it links my program.

Thanks,

Alex
Re: Linking Custom Function Libraries to Program Edward Diener
12/24/2003 3:23:03 PM
Either add tools.c to your project, or make a separate library/Dll from
tools.c/tools.h and link with that library.

[quoted text, click to view]

Re: Linking Custom Function Libraries to Program Alex Resnik
12/25/2003 9:26:11 AM
Edward,

Could you go into more detail of exactly how I can link
the compiled version of my "Tool.c" file with the program
I want to use it in?

Thanks,

AddThis Social Bookmark Button