-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
On Windows: Linking against standard libraries #1945
Comments
You can use
See the command line translation here:
From Bazel 0.5.3, we no longer use wrapper script to invoke MSVC compiler anymore. So |
Thanks for the solution! |
Thanks laszlo! You walked out that elevator like a boss! |
@grandseiken : hey Stuart, small world :) |
This was referenced Oct 24, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For C++,
linkopts
allows one to specify linker options. However, it also states that:As far as I can see, this means that I cannot specify plain arguments to the linker, e.g.
User32.lib
, as required for some system libraries.I got it to link to the system library by copying it locally, specifying it as a
srcs
in acc_library
, and referring to the library's label in bothdeps
andlinkopts
. However, copying a system library seems like a bad idea. The C++ system header files are already picked up automatically by Bazel, so maybe these libraries should be, too. I noticed that CMake automatically links against some libraries on Windows, i.e. it links againstuser32.lib advapi32.lib gdi32.lib
when compiling openssl on Windows without explicitly specifying these anywhere.The text was updated successfully, but these errors were encountered: