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

[BUG] Catch2 not rebuilt when switching toolchain from :msvc to :debug:msvc #117

Open
david-bakin opened this issue Mar 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@david-bakin
Copy link

david-bakin commented Mar 16, 2022

Windows 10, VS2022, dds 0.1.0-alpha.6

Running through the tutorial I got to the end where strings.test.cpp was built using the Catch2 framework (via test_driver). Built using dds build -t :msvc: worked fine.

Then ran dds build -t :debug:msvc and got a link fail because apparently Catch2 was not rebuilt with debug flags - expected behavior was that Catch2 would be rebuilt with the debug flags per the spec which says dds ensures that everything is built with the same compiler flags.

R:\BBits\dds-tutorial>dds build -t :debug:msvc
[info ] [tutorial/tutorial-hello] Compile: hello\strings.test.cpp
[info ] [tutorial/tutorial-hello] Compile: hello-world.main.cpp
[info ] [tutorial/tutorial-hello] Compile: hello\strings.cpp
[info ] [tutorial/tutorial-hello] Compile: hello\strings.cpp -     717ms [1/3]
[info ] [tutorial/tutorial-hello] Compile: hello-world.main.cpp -     800ms [2/3]
[info ] [tutorial/tutorial-hello] Compile: hello\strings.test.cpp -    1053ms [3/3]
[info ] Compilation completed in 1329ms
[info ] [tutorial/tutorial-hello] Archive: libtutorial-hello.lib
[info ] [tutorial/tutorial-hello] Archive: libtutorial-hello.lib - 33ms
[info ] Archiving completed in 44ms
[info ] [tutorial/tutorial-hello] Link: hello-world.exe
[info ] [tutorial/tutorial-hello] Link: test\hello\strings.exe
[info ] [tutorial/tutorial-hello] Link: test\hello\strings.exe         -    728ms
[info ] [tutorial/tutorial-hello] Link: hello-world.exe                -   1325ms
[error] Failed to link executable [R:\BBits\dds-tutorial\_build\test\hello\strings.exe]. Link command was [cl.exe /nologo /EHsc "\\p70-host\repos-srcs\BBits\dds-tutorial\_build\obj\hello\strings.test.cpp.obj" "_build\libtutorial-hello.lib" "\\p70-host\repos-srcs\BBits\dds-tutorial\_build\_test-driver\v1\catch2\catch-main.cpp.obj" "/Fe_build\test\hello\strings.exe" /MTd /Z7] [Exited 2], produced output:
catch-main.cpp.obj : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in strings.test.cpp.obj
catch-main.cpp.obj : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in strings.test.cpp.obj
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
_build\test\hello\strings.exe : fatal error LNK1319: 2 mismatches detected

[error] Linking a runtime binary (executable/shared library/DLL) failed
[error]
Linking a runtime binary file failed. There are a variety of possible causes
for this error. Refer to the documentation for more information.

[error] Refer: https://vector-of-bool.github.io/docs/dds/err/link-failure.html

Deleting _build and rebuilding clean did in fact work fine.

@david-bakin david-bakin added the bug Something isn't working label Mar 16, 2022
@david-bakin david-bakin changed the title [BUG] Catch2 not rebuilt when switching from :msvc to :debug:msvc [BUG] Catch2 not rebuilt when switching toolchain from :msvc to :debug:msvc Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant