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

First build and test run of program_options #2

Merged
merged 3 commits into from
Jun 1, 2024

Conversation

andrewkatson
Copy link

This has all tests passing. Didn't bother with the cfg or python tests

@andrewkatson
Copy link
Author

@zaucy have you seen this error. I have seen it with my Windows build of my personal project but I have never fixed it before.

ERROR: D:/a/program_options/program_options/test/BUILD.bazel:20:9: Linking optional_test.exe failed: (Exit 1104): link.exe failed: error executing CppLink command (from target //:optional_test) C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe @bazel-out/x64_windows-fastbuild/bin/optional_test.exe-2.params
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc143-mt-x64-1_83.lib'

@zaucy
Copy link
Member

zaucy commented Jun 1, 2024

Yea that's boosts "auto-linking" feature. Not very useful for bazel projects. All you gotta do is add BOOST_ALL_NO_LIB to the boost target (//:program_options) to disable it. e.g. https://github.com/bazelboost/filesystem/blob/bazelboost-1.83.0/BUILD.bazel#L16

@andrewkatson
Copy link
Author

How did you figure that out?

@zaucy
Copy link
Member

zaucy commented Jun 1, 2024

just by knowing about the auto linking feature. I started using boost 10 years ago and I had to deal with it plenty when compiling boost on Windows. You may see it on other C++ projects that use msvc if you ever see this:

#pragma comment(lib, "some_library_you_want_to_link")

references:

Copy link
Member

@zaucy zaucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for getting this up and running!

@zaucy zaucy merged commit 72cdf40 into bazelboost:bazelboost-1.83.0 Jun 1, 2024
3 checks passed
@andrewkatson
Copy link
Author

andrewkatson commented Jun 1, 2024

Thank you for explaining that! That will definitely help. I love learning new things. Let me know when it is merged so I can start on the next one.

@zaucy
Copy link
Member

zaucy commented Jun 1, 2024

released! 1.83.0.bzl.2 should be in the registry!

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