472,973 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Using Additional Library Directories & Additional Dependencies

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

May 25 '07 #1
6 16905
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
May 27 '07 #2
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
May 29 '07 #3
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
>
Jun 13 '07 #4

"Yogi Watcher" <Yo*********@discussions.microsoft.comwrote in message
news:E9**********************************@microsof t.com...
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
Jun 14 '07 #5
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" <Yo*********@discussions.microsoft.comwrote in message
news:E9**********************************@microsof t.com...
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
>
Jun 14 '07 #6
Hello! Good Site! Thanks you! aonalsqzuk
Jun 21 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
4
by: Tom | last post by:
I want to stream objects to sockets and/or files. wxWindows supports this, but I don't think it uses standard streams. I think it uses it's own. Boost doesn't have system services I think. ...
1
by: Marcohp | last post by:
I am migrating my C++ numerical routines to C#. In C++ I use pre-built C DLL libraries (fft.dll, fft.lib), so in Visual Studio I specify the path to include and library files and in the linker the...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
0
by: Denis Sohet | last post by:
Hi, I have to use a MFC C++ DLL (unmanaged of course) in a C++ .Net project. I have problems to do that. I've created a C++ .Net project and includes the MFC DLL. My problems comes as soon as I...
3
by: Manny Silva | last post by:
Hi, I would like to create a static library that uses and in effect adds to another static library. I could simply add functionality to the existing library, but functionally it doesn't really...
6
by: greek_bill | last post by:
Hi, I'm interested in developing an application that needs to run on more than one operating system. Naturally, a lot of the code will be shared between the various OSs, with OS specific...
10
by: Phil | last post by:
VB2005 Express. I am developing a solution that involves a windows forms application and a number of class library projects (DLLs). Some of the DLLs require extra data files or third party dlls. I...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.