-
Notifications
You must be signed in to change notification settings - Fork 1
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
multiple definition of 'testCases_metadata' #2
Comments
That's strange, I can't reproduce this behavior. What compiler are you using? Mine is the MSVC build tools on Windows, I've also tried the latest GCC on Linux and besides a few minor warnings (which I will fix in the next version) it works fine. Here are my sources:
#include "picotest.h"
PICOTEST_SUITE(mainSuite, testCases);
void main() {
mainSuite(NULL);
}
#include <stdio.h>
#include "picotest.h"
PICOTEST_SUITE(testCases, testcase);
PICOTEST_CASE(testcase) {
printf("testcase\n");
PICOTEST_ASSERT(0);
} |
Even though I couldn't reproduce the problem, you're right about |
I am using MSys64/MinGW-w64 on Windows with CLion. Release 1.41 fixes the issue, thanks! It also fixes |
Because
_PICOTEST_SUITE_DECLARE_SUBTEST(_testName)
in picotest.h does not declare
PicoTestMetadata _PICOTEST_METADATA(_testName)
as 'extern' a PicoTestMetadata struct is created in each .obj file, which leads to conflict.
v.1.3.0 builds without error.
The text was updated successfully, but these errors were encountered: