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

link error with MSVC turned on Address Sanitizer #1145

Open
BH2WFR opened this issue Dec 17, 2024 · 1 comment
Open

link error with MSVC turned on Address Sanitizer #1145

BH2WFR opened this issue Dec 17, 2024 · 1 comment

Comments

@BH2WFR
Copy link

BH2WFR commented Dec 17, 2024

My project is dependent on ceres-solver, and the ceres-solver depends on glog and gflags.
my compiler is MSVC 14.x, and It works well without /fsanitize=address compile option. but when I turn on this (to turn on Address Sanitizer), it causes link errors like picture below:

I used to compile glog and gflags again with /fsanitize=address option added, but it doesn't work.
Anybody met similar problems?

Image

@BH2WFR BH2WFR changed the title Problem with MSVC + ASAN link error with MSVC turned on Address Sanitizer Dec 17, 2024
@sergiud
Copy link
Collaborator

sergiud commented Dec 17, 2024

You need to compile all the dependencies with ASan enabled hence the mismatch. You also seem to have enabled precompiled headers that specifically trigger the linker errors.

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

No branches or pull requests

2 participants