|
-
April 5th, 2012, 12:17 PM
#16
Re: libraries and linking
I have cleverly discovered what "link library dependencies" is all about. I think it means "link against project dependencies". Are Microsoft good at misleading people?
-
April 5th, 2012, 02:57 PM
#17
Re: libraries and linking
The settings dialog says: Specifies whether or not library outputs from project dependencies are automatically linked in. Could they be more clear than that?
-
April 5th, 2012, 05:33 PM
#18
Re: libraries and linking
 Originally Posted by c94wjpn
... you missed the bit that said
Okay, let's try this other way.
Code:
// library B
void b() { . . . }
// library A
void a()
{
b();
}
// application P
int main()
{
a();
return 0;
}
In case you build A providing no path to B, the library builds fine leaving symbol b unresolved. Further you build P "against A and only A". Now, how can you expect P to build successfully when the code chain depends on symbol b which still remains unresolved?
To resolve b, you either let P know about B, or otherwise A must know about B. In the latter case A copies object b to be inside A, and ultimately P copies object b from A. In the former case P should take that copy directly from B. (Actually, this is what my sample was all about )
Does this description match to your case? If it doesn't, you need to explain the missed details.
Last edited by Igor Vartanov; April 5th, 2012 at 05:35 PM.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|