Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static libs seem to always link in references #17

Open
TheClassic opened this issue Nov 16, 2016 · 2 comments
Open

Static libs seem to always link in references #17

TheClassic opened this issue Nov 16, 2016 · 2 comments
Labels

Comments

@TheClassic
Copy link
Contributor

TheClassic commented Nov 16, 2016

When building through Visual Studio, I get no linking errors. With msfastbuild, I get error LNK4006 (symbol already defined). I noticed referenced projects were included in the bff under Librarian Options, which is not what I would expect in this case (normally expect to link the references into a dll or exe not a static lib). I was able to reproduce this problem in Visual Studio by enabling the Librarian option "Link Library Dependencies". I propose and plan on only including referenced libs if this option is set to true. (I'll probably have a pull request before anybody reads this, but if not, feedback on the plan would be appreciated)

@liamkf liamkf added the bug label Nov 16, 2016
@liamkf
Copy link
Owner

liamkf commented Nov 16, 2016

Your plan seems reasonable to me! I don't have too many projects I've built that use those project reference options so there's probably a few problems lurking in there. I would think checking if the LinkLibraryDependencies node is false before adding the dependent in EvaluateProjectReferences would be enough. I'm not quite sure what I'm expecting if we're referencing the output assembly but not linking the dependencies... if the project is available somewhere I'd be happy to have a look or add it to the things that get built.

Regardless, thanks for the report, and let me know if you get stuck!

@TheClassic
Copy link
Contributor Author

Thanks, I have some ideas, I'll take a stab. Unfortunately, I can't share
what I'm using this for so I would have to contrive examples. Thanks for
making this available, having a blast.

On Tue, Nov 15, 2016, 11:31 PM Liam notifications@github.com wrote:

Your plan seems reasonable to me! I don't have too many projects I've
built that use those project reference options so there's probably a few
problems lurking in there. I would think checking if the
LinkLibraryDependencies node is false before adding the dependent in
EvaluateProjectReferences would be enough. I'm not quite sure what I'm
expecting if we're referencing the output assembly but not linking the
dependencies... if the project is available somewhere I'd be happy to have
a look or add it to the things that get built.

Regardless, thanks for the report, and let me know if you get stuck!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#17 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABi1de3wS6S8lXlKJ7by7qNvFcQ5NlQuks5q-octgaJpZM4KzRXa
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants