Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2007

Tip: Looking for answers? Try searching our database.

Using Additional Library Directories & Additional Dependencies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yogi Watcher - 25 May 2007 04:55 GMT
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
Peter Ritchie [C# MVP] - 27 May 2007 16:25 GMT
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").

Signature

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

> Hello,
>
[quoted text clipped - 25 lines]
> Thanks and Regards
> Yogi Watcher
Yogi Watcher - 29 May 2007 21:38 GMT
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

> 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
[quoted text clipped - 33 lines]
> > Thanks and Regards
> > Yogi Watcher
Yogi Watcher - 13 Jun 2007 22:00 GMT
Hello,

Can anybody help me here?

> Hello Peter,
>
[quoted text clipped - 47 lines]
> > > Thanks and Regards
> > > Yogi Watcher
Ben Voigt [C++ MVP] - 14 Jun 2007 06:30 GMT
> 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.

>> Hello Peter,
>>
[quoted text clipped - 66 lines]
>> > > Thanks and Regards
>> > > Yogi Watcher
Yogi Watcher - 14 Jun 2007 15:23 GMT
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.

> > Hello,
> >
[quoted text clipped - 77 lines]
> >> > > Thanks and Regards
> >> > > Yogi Watcher
pcmblkkicz - 22 Jun 2007 00:08 GMT
Hello! Good Site! Thanks you! aonalsqzuk

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.