VS.NET 2003 linker dependencies bug 
Author Message
 VS.NET 2003 linker dependencies bug

Hi,

I have identified a bug in linker dependencies. When I use relative path
(without drive letter) in Additional Library Dependencies, the project is
never up-to-date. When I add the drive letter, it works as it should. Can
someone verify this bug?

Regards, Jan



Fri, 11 Nov 2005 18:28:19 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
>I have identified a bug in linker dependencies. When I use relative path
>(without drive letter) in Additional Library Dependencies, the project is
>never up-to-date. When I add the drive letter, it works as it should. Can
>someone verify this bug?

Jan,

Can you give us an example of what you're doing and how to reproduce
it - just so there's no ambiguity.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Fri, 11 Nov 2005 19:08:07 GMT  
 VS.NET 2003 linker dependencies bug
I will try:

(use debug builds)
1. Create static library with wizard, with on function TestLib()
2. Create console program, add main function that calls TestLib().
- This will not link because _TestLib symbol  is not found
3. In linker settings "Additional Library Directories" add path to the
library without disk name, such as "\Lib\debug"
4. In linker settings "Additional dependencies" add the library (without
path)
- Now the project will link but when you run or build again, it will link
again
5. Add disc name to "Additional Library Directories"
- Now the project will link only once, after that you will see up-to-date

Hope that I was clear enough, Jan


Quote:
> >I have identified a bug in linker dependencies. When I use relative path
> >(without drive letter) in Additional Library Dependencies, the project is
> >never up-to-date. When I add the drive letter, it works as it should. Can
> >someone verify this bug?

> Jan,

> Can you give us an example of what you're doing and how to reproduce
> it - just so there's no ambiguity.

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq



Fri, 11 Nov 2005 20:36:07 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
>1. Create static library with wizard, with on function TestLib()
>2. Create console program, add main function that calls TestLib().
>- This will not link because _TestLib symbol  is not found
>3. In linker settings "Additional Library Directories" add path to the
>library without disk name, such as "\Lib\debug"
>4. In linker settings "Additional dependencies" add the library (without
>path)
>- Now the project will link but when you run or build again, it will link
>again

Jan,

I'm afraid I'm not seeing that happen in my recreation of your
example. Once I've build the projects, all I get is 2 "up-to-date"
notification messages. I have included the library and console test
projects in the same solution, but I've not set up any dependency
between them.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 02:58:06 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
> notification messages. I have included the library and console test
> projects in the same solution, but I've not set up any dependency

OK, please try use separate solutions, I did not mention that in my email.

Jan



Sat, 12 Nov 2005 14:30:24 GMT  
 VS.NET 2003 linker dependencies bug
OK, I can see something odd now - but I don't think it's the separate
solutions.

If I specify the Linker Additional Dependencies setting as "LibName"
then it continually re-links when I do a build. On the other hand, if
I specify the name as "LibName.lib" subsequent builds just say
"up-to-date".

The full/relative path in the Additional Library Directories setting
doesn't appear to make any difference.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 18:04:02 GMT  
 VS.NET 2003 linker dependencies bug
David,

for me too the same problems with missign lib extension. And when I use
relative path it works fine just like for you. But when I use incomplete
path in "Additional Library Directories", such as \Test\debug (not the
missing drive spec), it doesn't work. You are right, it doesn't matter if
the solutions are separate or not. You can even set the dependency on
library.

I hope you will be able to replicate, Jan


Quote:
> OK, I can see something odd now - but I don't think it's the separate
> solutions.

> If I specify the Linker Additional Dependencies setting as "LibName"
> then it continually re-links when I do a build. On the other hand, if
> I specify the name as "LibName.lib" subsequent builds just say
> "up-to-date".

> The full/relative path in the Additional Library Directories setting
> doesn't appear to make any difference.

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 19:39:36 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
>for me too the same problems with missign lib extension. And when I use
>relative path it works fine just like for you. But when I use incomplete
>path in "Additional Library Directories", such as \Test\debug (not the
>missing drive spec), it doesn't work. You are right, it doesn't matter if
>the solutions are separate or not. You can even set the dependency on
>library.

>I hope you will be able to replicate, Jan

I'll try to pass on the comments regarding what I've found to MS, but
I suspect it's "working as designed" since the linker input doesn't
need the extension, but the IDE dependency mechanism (presumably)
does.

Unless we can come up with a way of reproducing your situation with
relative paths I don't know what else to suggest.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 21:21:27 GMT  
 VS.NET 2003 linker dependencies bug
If you've not done so already, have a look at the post titled "Project
Configurations are out of date -- another solution for Libraries/LIB
files" from Charles Cafrelli.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 21:25:09 GMT  
 VS.NET 2003 linker dependencies bug
David, have you tried *incomplete* paths? For me the relative path (path
that don't start with backslash) works. But path without drive letter that
start with backslash doesn't work. You can even use incomplete path right
inside Input/Additional Dependencies to exhibit the behaviour.

Jan

Quote:
> Unless we can come up with a way of reproducing your situation with
> relative paths I don't know what else to suggest.

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sat, 12 Nov 2005 22:15:18 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
>David, have you tried *incomplete* paths?

Yes, but as it couldn't then find the LIB file I assumed you'd made a
typo.

Presumably you're telling me that isn't the case - in which case it's
a usage I've not come across before.

What is the directory structure of your application and library
projects?

Mine are:

projects root\lib\lib\debug
projects root\app\app\debug

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Sun, 13 Nov 2005 00:11:03 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
> Yes, but as it couldn't then find the LIB file I assumed you'd made a
> typo.

No, with incomplete path it links, but it is never up-to-date

Quote:
> Presumably you're telling me that isn't the case - in which case it's
> a usage I've not come across before.

In real situation I have a static library shared between many projects. Both
library and project reside on the same disc, so I ommited the disk letter
from path specification. This worked with VS.NET 2002.

Quote:

> What is the directory structure of your application and library
> projects?

> Mine are:

> projects root\lib\lib\debug
> projects root\app\app\debug

I have both library and the resulting exe on the same path, but in doesn't
make the different. It's enough to have both on the same disc.
e:\Tempo\UseLib - sources and projects of Lib and UseLib
e:\Tempo\UseLib\debug - results

If I type \Tempo\UseLib\debug in "Additional Library Directories" or
\Tempo\UseLib\debug\Lib.lib in "Additional dependencies" it links but is
never up-to-date. If I add drive letter, it works.

Thanks for you patience :-)

Jan



Mon, 14 Nov 2005 14:12:40 GMT  
 VS.NET 2003 linker dependencies bug

Quote:
>> Yes, but as it couldn't then find the LIB file I assumed you'd made a
>> typo.

>No, with incomplete path it links, but it is never up-to-date

Not for me - it just won't link because it can't find the LIB file.

Quote:
>> Presumably you're telling me that isn't the case - in which case it's
>> a usage I've not come across before.

>In real situation I have a static library shared between many projects. Both
>library and project reside on the same disc, so I ommited the disk letter
>from path specification.

But I still don't see how this would work when you specify the lib
path as "\path" rather than a path relative to your current project -
unless your lib path is at the drive root - i.e. X:\lib

Quote:
>> What is the directory structure of your application and library
>> projects?

>> Mine are:

>> projects root\lib\lib\debug
>> projects root\app\app\debug

>I have both library and the resulting exe on the same path, but in doesn't
>make the different. It's enough to have both on the same disc.
>e:\Tempo\UseLib - sources and projects of Lib and UseLib
>e:\Tempo\UseLib\debug - results

>If I type \Tempo\UseLib\debug in "Additional Library Directories" or
>\Tempo\UseLib\debug\Lib.lib in "Additional dependencies" it links but is
>never up-to-date. If I add drive letter, it works.

Ah, so you are basing things from the root of the drive - so it is a
relative path after all!

However, I still get the same result - "up-to-date" on successive
builds.

Can anyone else reproduce this?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Wed, 16 Nov 2005 00:08:11 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. VS.NET 2003 file dependencies problem.

2. Possible MC++ bug in VS.NET 2003

3. (CP) Possible bug in math.h in VS.NET 2003 FB

4. Bug in VS.NET 2003 ?

5. Possible bug: MIDL properties missing in VS.NET 2003 Final Beta

6. (CP) Possible bug in math.h in VS.NET 2003 FB

7. VS.NET 2003 VC++ and .NET controls

8. Debugging with VS.NET 2003 and VS 6

9. Friend linker error Visual C++ .NET 2003

10. Bug in atlbase.h for vs 2003??

11. Copy VS.NET 2003 settings to another machine...

12. VS.Net 2003 compiler issues

 

 
Powered by phpBB® Forum Software