-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Feature Request: Export for DLL #515
Labels
Comments
Any updates on this feature request? |
Must have; otherwise catch2 does not qualify for cross-platform development |
ping |
Martin, that link only says you won't support DLLs under Windows. Why not? Little change to your code, big gain in usability! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about adding a EXPORT MACRO inside catch?
Actually with GCC/CLANG I can just CATCH_CONFIG_MAIN inside a DLL and link with executables. However the same is not possible with visual studio because it insist to say that "libCatch.lib" cannot be opened. (I'm using Cmake to automate most stuff, after investigation I found that's the error for missing exported symbols). The problem is fixed using Catch as static library, however the static library means instead of getting many executables of 170 Kb, I get many executables of ~1MB, wich could become an issue If later I have hundreds test files.
I want to be able to define a CATCH_EXPORT macro or something similiar beside CATCH_CONFIG_MAIN so I can use shared library also with visual studio.
The use case scenario is.
1 Catch.dll
Many test executables (each one separately linked and runeed against the DLL).
Possibly I want just to compile the following file to get the DLL (right know I think Catch just deduces Import/export settings assuming all test cases are linked togheter into 1 executable, however that has the serious problem that if 1 test fail CMake execution of tests will interrupt, while with my current setup all tests are runned indipendently of wich fails)
Catch.cpp
The text was updated successfully, but these errors were encountered: