PC Review


Reply
Thread Tools Rate Thread

Using Additional Library Directories & Additional Dependencies

 
 
=?Utf-8?B?WW9naSBXYXRjaGVy?=
Guest
Posts: n/a
 
      25th May 2007
Hello,

I am using Visual Studio-2003. I created a project to build my library.
Since I am using third party libraries as well, I have specified those
additional library dependencies in project as "Additional Dependencies" under
Linker-Input options. Since those libraries are also in different directory,
I specified that library path in project as "Additional Library Directories"
under Linker-General options.

This is where I see some odd behavior. When I compile and link, all my
libraries specified as "Additional Dependencies" appear twice and I get lots
of linking error. When I look under Linker-Command Line property, I see that
each of my library from "Additional Dependencies" is listed there twice, once
with just the name and other with directory path (same path as specified in
"Additional Library Directories").

Now, however, if I remove library path from "Additional Library
Directories", and add that same path (with "/LIBPATH:" as prefix) in project
as "Additional Options" under Linker-Command Line options, every thing works
fine (I have to close and restart Visual Studio), but linking works fine
without any errors.

Am I doing something wrong? Did I not understand usage of "Additional
Library Directories" & "Additional Dependencies" properties?

Any thoughts?

Thanks and Regards
Yogi Watcher

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgUml0Y2hpZSBbQyMgTVZQXQ==?=
Guest
Posts: n/a
 
      27th May 2007
Are these libraries also projects in your solution? If you reference a
library project from another project VS knows how to find the LIB file for
you, you don't have to add additional library directories.

Or, are those library directories set in Visual Studio's global settings?
(Tools/Options, Projects/VC++ Directoires, and "Show directories for" and
"Library files").

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#


"Yogi Watcher" wrote:

> Hello,
>
> I am using Visual Studio-2003. I created a project to build my library.
> Since I am using third party libraries as well, I have specified those
> additional library dependencies in project as "Additional Dependencies" under
> Linker-Input options. Since those libraries are also in different directory,
> I specified that library path in project as "Additional Library Directories"
> under Linker-General options.
>
> This is where I see some odd behavior. When I compile and link, all my
> libraries specified as "Additional Dependencies" appear twice and I get lots
> of linking error. When I look under Linker-Command Line property, I see that
> each of my library from "Additional Dependencies" is listed there twice, once
> with just the name and other with directory path (same path as specified in
> "Additional Library Directories").
>
> Now, however, if I remove library path from "Additional Library
> Directories", and add that same path (with "/LIBPATH:" as prefix) in project
> as "Additional Options" under Linker-Command Line options, every thing works
> fine (I have to close and restart Visual Studio), but linking works fine
> without any errors.
>
> Am I doing something wrong? Did I not understand usage of "Additional
> Library Directories" & "Additional Dependencies" properties?
>
> Any thoughts?
>
> Thanks and Regards
> Yogi Watcher
>

 
Reply With Quote
 
 
 
 
=?Utf-8?B?WW9naSBXYXRjaGVy?=
Guest
Posts: n/a
 
      29th May 2007
Hello Peter,

No, these additional libraries are not part of my solution. These libraries
are part of third party tool set.

I have not added the library path as VS global project setting. I added it
only as local project option (right click on the project and then properties).

I wonder if VS by default adds all libraries found in the directories
pointed to by "Additional Library Directories" option?

Thanks
Yogi Watcher


"Peter Ritchie [C# MVP]" wrote:

> Are these libraries also projects in your solution? If you reference a
> library project from another project VS knows how to find the LIB file for
> you, you don't have to add additional library directories.
>
> Or, are those library directories set in Visual Studio's global settings?
> (Tools/Options, Projects/VC++ Directoires, and "Show directories for" and
> "Library files").
>
> --
> Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> http://www.peterRitchie.com/blog/
> Microsoft MVP, Visual Developer - Visual C#
>
>
> "Yogi Watcher" wrote:
>
> > Hello,
> >
> > I am using Visual Studio-2003. I created a project to build my library.
> > Since I am using third party libraries as well, I have specified those
> > additional library dependencies in project as "Additional Dependencies" under
> > Linker-Input options. Since those libraries are also in different directory,
> > I specified that library path in project as "Additional Library Directories"
> > under Linker-General options.
> >
> > This is where I see some odd behavior. When I compile and link, all my
> > libraries specified as "Additional Dependencies" appear twice and I get lots
> > of linking error. When I look under Linker-Command Line property, I see that
> > each of my library from "Additional Dependencies" is listed there twice, once
> > with just the name and other with directory path (same path as specified in
> > "Additional Library Directories").
> >
> > Now, however, if I remove library path from "Additional Library
> > Directories", and add that same path (with "/LIBPATH:" as prefix) in project
> > as "Additional Options" under Linker-Command Line options, every thing works
> > fine (I have to close and restart Visual Studio), but linking works fine
> > without any errors.
> >
> > Am I doing something wrong? Did I not understand usage of "Additional
> > Library Directories" & "Additional Dependencies" properties?
> >
> > Any thoughts?
> >
> > Thanks and Regards
> > Yogi Watcher
> >

 
Reply With Quote
 
=?Utf-8?B?WW9naSBXYXRjaGVy?=
Guest
Posts: n/a
 
      13th Jun 2007
Hello,

Can anybody help me here?

"Yogi Watcher" wrote:

> Hello Peter,
>
> No, these additional libraries are not part of my solution. These libraries
> are part of third party tool set.
>
> I have not added the library path as VS global project setting. I added it
> only as local project option (right click on the project and then properties).
>
> I wonder if VS by default adds all libraries found in the directories
> pointed to by "Additional Library Directories" option?
>
> Thanks
> Yogi Watcher
>
>
> "Peter Ritchie [C# MVP]" wrote:
>
> > Are these libraries also projects in your solution? If you reference a
> > library project from another project VS knows how to find the LIB file for
> > you, you don't have to add additional library directories.
> >
> > Or, are those library directories set in Visual Studio's global settings?
> > (Tools/Options, Projects/VC++ Directoires, and "Show directories for" and
> > "Library files").
> >
> > --
> > Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> > http://www.peterRitchie.com/blog/
> > Microsoft MVP, Visual Developer - Visual C#
> >
> >
> > "Yogi Watcher" wrote:
> >
> > > Hello,
> > >
> > > I am using Visual Studio-2003. I created a project to build my library.
> > > Since I am using third party libraries as well, I have specified those
> > > additional library dependencies in project as "Additional Dependencies" under
> > > Linker-Input options. Since those libraries are also in different directory,
> > > I specified that library path in project as "Additional Library Directories"
> > > under Linker-General options.
> > >
> > > This is where I see some odd behavior. When I compile and link, all my
> > > libraries specified as "Additional Dependencies" appear twice and I get lots
> > > of linking error. When I look under Linker-Command Line property, I see that
> > > each of my library from "Additional Dependencies" is listed there twice, once
> > > with just the name and other with directory path (same path as specified in
> > > "Additional Library Directories").
> > >
> > > Now, however, if I remove library path from "Additional Library
> > > Directories", and add that same path (with "/LIBPATH:" as prefix) in project
> > > as "Additional Options" under Linker-Command Line options, every thing works
> > > fine (I have to close and restart Visual Studio), but linking works fine
> > > without any errors.
> > >
> > > Am I doing something wrong? Did I not understand usage of "Additional
> > > Library Directories" & "Additional Dependencies" properties?
> > >
> > > Any thoughts?
> > >
> > > Thanks and Regards
> > > Yogi Watcher
> > >

 
Reply With Quote
 
Ben Voigt [C++ MVP]
Guest
Posts: n/a
 
      14th Jun 2007

"Yogi Watcher" <(E-Mail Removed)> wrote in message
news:E900C017-B702-49B4-99E0-(E-Mail Removed)...
> Hello,
>
> Can anybody help me here?


You can configure the list of directories the linker searches. I think
you've already found that. The linker still only uses libraries named in
the makefile, not all libraries in the directory.

You can use a #pragma comment to cause a library to be linked by all users
of a header file though, which may fill your need.

>
> "Yogi Watcher" wrote:
>
>> Hello Peter,
>>
>> No, these additional libraries are not part of my solution. These
>> libraries
>> are part of third party tool set.
>>
>> I have not added the library path as VS global project setting. I added
>> it
>> only as local project option (right click on the project and then
>> properties).
>>
>> I wonder if VS by default adds all libraries found in the directories
>> pointed to by "Additional Library Directories" option?
>>
>> Thanks
>> Yogi Watcher
>>
>>
>> "Peter Ritchie [C# MVP]" wrote:
>>
>> > Are these libraries also projects in your solution? If you reference a
>> > library project from another project VS knows how to find the LIB file
>> > for
>> > you, you don't have to add additional library directories.
>> >
>> > Or, are those library directories set in Visual Studio's global
>> > settings?
>> > (Tools/Options, Projects/VC++ Directoires, and "Show directories for"
>> > and
>> > "Library files").
>> >
>> > --
>> > Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
>> > http://www.peterRitchie.com/blog/
>> > Microsoft MVP, Visual Developer - Visual C#
>> >
>> >
>> > "Yogi Watcher" wrote:
>> >
>> > > Hello,
>> > >
>> > > I am using Visual Studio-2003. I created a project to build my
>> > > library.
>> > > Since I am using third party libraries as well, I have specified
>> > > those
>> > > additional library dependencies in project as "Additional
>> > > Dependencies" under
>> > > Linker-Input options. Since those libraries are also in different
>> > > directory,
>> > > I specified that library path in project as "Additional Library
>> > > Directories"
>> > > under Linker-General options.
>> > >
>> > > This is where I see some odd behavior. When I compile and link, all
>> > > my
>> > > libraries specified as "Additional Dependencies" appear twice and I
>> > > get lots
>> > > of linking error. When I look under Linker-Command Line property, I
>> > > see that
>> > > each of my library from "Additional Dependencies" is listed there
>> > > twice, once
>> > > with just the name and other with directory path (same path as
>> > > specified in
>> > > "Additional Library Directories").
>> > >
>> > > Now, however, if I remove library path from "Additional Library
>> > > Directories", and add that same path (with "/LIBPATH:" as prefix) in
>> > > project
>> > > as "Additional Options" under Linker-Command Line options, every
>> > > thing works
>> > > fine (I have to close and restart Visual Studio), but linking works
>> > > fine
>> > > without any errors.
>> > >
>> > > Am I doing something wrong? Did I not understand usage of "Additional
>> > > Library Directories" & "Additional Dependencies" properties?
>> > >
>> > > Any thoughts?
>> > >
>> > > Thanks and Regards
>> > > Yogi Watcher
>> > >


 
Reply With Quote
 
=?Utf-8?B?WW9naSBXYXRjaGVy?=
Guest
Posts: n/a
 
      14th Jun 2007
Thank you.

If you look at the original post, you will see that my problem is little
different. When I use linker path using Additional Library Directories, then
each of the library named in additional dependancy is used twice, while if I
use linker path as additional options this does not happen.

"Ben Voigt [C++ MVP]" wrote:

>
> "Yogi Watcher" <(E-Mail Removed)> wrote in message
> news:E900C017-B702-49B4-99E0-(E-Mail Removed)...
> > Hello,
> >
> > Can anybody help me here?

>
> You can configure the list of directories the linker searches. I think
> you've already found that. The linker still only uses libraries named in
> the makefile, not all libraries in the directory.
>
> You can use a #pragma comment to cause a library to be linked by all users
> of a header file though, which may fill your need.
>
> >
> > "Yogi Watcher" wrote:
> >
> >> Hello Peter,
> >>
> >> No, these additional libraries are not part of my solution. These
> >> libraries
> >> are part of third party tool set.
> >>
> >> I have not added the library path as VS global project setting. I added
> >> it
> >> only as local project option (right click on the project and then
> >> properties).
> >>
> >> I wonder if VS by default adds all libraries found in the directories
> >> pointed to by "Additional Library Directories" option?
> >>
> >> Thanks
> >> Yogi Watcher
> >>
> >>
> >> "Peter Ritchie [C# MVP]" wrote:
> >>
> >> > Are these libraries also projects in your solution? If you reference a
> >> > library project from another project VS knows how to find the LIB file
> >> > for
> >> > you, you don't have to add additional library directories.
> >> >
> >> > Or, are those library directories set in Visual Studio's global
> >> > settings?
> >> > (Tools/Options, Projects/VC++ Directoires, and "Show directories for"
> >> > and
> >> > "Library files").
> >> >
> >> > --
> >> > Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> >> > http://www.peterRitchie.com/blog/
> >> > Microsoft MVP, Visual Developer - Visual C#
> >> >
> >> >
> >> > "Yogi Watcher" wrote:
> >> >
> >> > > Hello,
> >> > >
> >> > > I am using Visual Studio-2003. I created a project to build my
> >> > > library.
> >> > > Since I am using third party libraries as well, I have specified
> >> > > those
> >> > > additional library dependencies in project as "Additional
> >> > > Dependencies" under
> >> > > Linker-Input options. Since those libraries are also in different
> >> > > directory,
> >> > > I specified that library path in project as "Additional Library
> >> > > Directories"
> >> > > under Linker-General options.
> >> > >
> >> > > This is where I see some odd behavior. When I compile and link, all
> >> > > my
> >> > > libraries specified as "Additional Dependencies" appear twice and I
> >> > > get lots
> >> > > of linking error. When I look under Linker-Command Line property, I
> >> > > see that
> >> > > each of my library from "Additional Dependencies" is listed there
> >> > > twice, once
> >> > > with just the name and other with directory path (same path as
> >> > > specified in
> >> > > "Additional Library Directories").
> >> > >
> >> > > Now, however, if I remove library path from "Additional Library
> >> > > Directories", and add that same path (with "/LIBPATH:" as prefix) in
> >> > > project
> >> > > as "Additional Options" under Linker-Command Line options, every
> >> > > thing works
> >> > > fine (I have to close and restart Visual Studio), but linking works
> >> > > fine
> >> > > without any errors.
> >> > >
> >> > > Am I doing something wrong? Did I not understand usage of "Additional
> >> > > Library Directories" & "Additional Dependencies" properties?
> >> > >
> >> > > Any thoughts?
> >> > >
> >> > > Thanks and Regards
> >> > > Yogi Watcher
> >> > >

>

 
Reply With Quote
 
pcmblkkicz
Guest
Posts: n/a
 
      22nd Jun 2007
Hello! Good Site! Thanks you! aonalsqzuk
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Additional Manifest Dependencies? S. Heck Microsoft VC .NET 1 4th Dec 2008 05:19 PM
WebConfig Could not load library/assembly or one of its dependencies Okeanos Microsoft C# .NET 0 28th Mar 2008 03:14 PM
Enterprise Library Caching Dependencies escher4096 Microsoft ASP .NET 0 24th Oct 2007 10:36 PM
Librarian->General->Additional Dependencies adds dependencies twic =?Utf-8?B?U3RldmV0OTY=?= Microsoft VC .NET 2 3rd Jun 2005 01:53 AM
Using virtual directories for common directories (scripts, images, styles, etc.) Jeffry van de Vuurst Microsoft ASP .NET 2 30th Jul 2003 08:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:32 PM.