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

Fix resolving .lib dependencies on windows. #91

Closed
wants to merge 1 commit into from
Closed

Fix resolving .lib dependencies on windows. #91

wants to merge 1 commit into from

Conversation

QAston
Copy link

@QAston QAston commented Jul 16, 2013

This fixes building vibe.d dependent projects on windows with dmd 2.063.2

@s-ludwig
Copy link
Member

Interesting, can you give a short sketch of the failing project's structure? (Just the project with a dependency to vibe.d?) I ask because Windows is my primary development platform and I didn't have issues so far. Handling of .libs needs to be fixed in any case though (e.g. proper handling of library search paths), I just want to make sure I understand what's happening.

@QAston
Copy link
Author

QAston commented Jul 16, 2013

{
    "name": "fancyprojname",
    "targetType": "library",
    "sourcePaths": ["protocol", "../util"],
    "dflags": ["-unittest"],
    "dependencies": {
        "vibe-d": {"version": "~master", "path": "../../vibe.d"}
    },
    "versions" : ["VibeCustomMain", "TraLaLa"],
}

fails with Error: Error reading file 'wsock32.lib' message

@QAston
Copy link
Author

QAston commented Jul 16, 2013

Ok, I've just noticed that dub does 2 stage build with dmd sometimes, in that case the fix won't work because it's dmd who solves -L-l flags, not optlink.

@QAston
Copy link
Author

QAston commented Jul 19, 2013

Odd, the problem has disappeared.

@QAston QAston closed this Jul 19, 2013
@s-ludwig
Copy link
Member

Okay, so it fails when generating static libraries. I think that should be resolved by removing all -lib dependencies from the linker command line altogether. They are added on dependent projects anyway and usually shouldn't have an effect when "linked" against another .lib.

@s-ludwig
Copy link
Member

Odd, the problem has disappeared.

I can still reproduce it BTW

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

Successfully merging this pull request may close these issues.

2 participants