-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Inconsistent library name creation over operating system #10354
Comments
Thanks for the report! The output filenames are not controlled by cargo but rustc. For Anyway, thanks for your findings! Refs:
|
I'm going to close as this is expected behavior when working on the msvc target. Libraries on msvc don't use the |
I am having actual failing builds trying to build a library and bin from the same project for both Windows and Linux since the PDB's collide. There's no way this is a weird edge case. I agree that changing the behavior of |
Not sure if I understand correctly, but you could name each target explicitly via the |
I reply since I did not explain why this behaviour bothered me: I used Scons for building application and one lib was made in Rust. Scons, whatever for Linux or Window, when it sees xxx it will expand to libxxx. In my case, it was not a big issue, since I renamed xxx to libxxx for Windows. In a general way, I hate the implicit 'lib' prefix whatever Scons, Rust, Linux tools because that creates so many issues just for saving |
Problem
I've never developed with Rust, but I'm facing issue with the creation of the library name made by someone else.
Cargo.toml:
Will create in target/debug/ a
libstigmark_client.lib
for Windows but aliblibstigmark_client.a
(same for dynamic lib). Soliblib
:)Will create
stigmark_client.lib
for Windows butlibstigmark_client.a
(same for dynamic lib).The issue is that when linking with the Python Makefile named
Scons
it will add-l
so the 2nd method is good for Linux but for Windows the 1st method is the good one.Steps
Possible Solution(s)
When parsing the library name:
lib
xxx is matched do not add extralib
lib
xxxNotes
No response
Version
The text was updated successfully, but these errors were encountered: