473,290 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,290 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 16954
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.