473,385 Members | 1,492 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,385 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 16969
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.