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

Best Practice for Setting Multiple Visual Studio MSVC targets #718

Closed
jmw992 opened this issue Feb 15, 2021 · 1 comment
Closed

Best Practice for Setting Multiple Visual Studio MSVC targets #718

jmw992 opened this issue Feb 15, 2021 · 1 comment
Labels
windows Issues that manifest on Windows

Comments

@jmw992
Copy link

jmw992 commented Feb 15, 2021

I am producing libraries which will be accessible to multiple versions of Visual Studio 2017 & 2019. I've been doing some some research and found these pretty useful links

https://users.rust-lang.org/t/which-visual-studio-version-does-msvc-toolset-use/45098

https://www.reddit.com/r/rust/comments/7jnf58/any_way_to_control_which_version_of_visual_studio/

rust-lang/rust#38584

From theses it seems like the options are

  1. run vcvars*.bat of the desired target in the command prompt before running cargo build
  2. running the build in the correct VS Developer command prompts, ex "x64 Command Prompt for VS 2017".
  3. manually set the LIB & PATH environmental variables to the desired folders

It seems like Option 1 is the best for my team as it would require the least amount of setup for the Windows C++ dev consumers, as the only thing they'd have to do is install Rust and then batch files can take care of the rest.

Those discussions are for rust in general, I'm curious if there are better options specific to CXX, is it worth making the switch to using Bazel based building?

@dtolnay dtolnay added the windows Issues that manifest on Windows label Oct 30, 2022
@dtolnay
Copy link
Owner

dtolnay commented Oct 30, 2022

Sorry that no one was able to provide guidance here. If this is still an issue, you could try taking this question to any of the resources shown in https://www.rust-lang.org/community.

@dtolnay dtolnay closed this as completed Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues that manifest on Windows
Projects
None yet
Development

No branches or pull requests

2 participants