This code:
test.h
#ifndef H__#define H__struct test{ static const int some_variable = 10;};#endif
main.cpp
#include <QtGlobal>#include "test.h"int main (void){ qMin(test::some_variable, 11);}
Compile without problem with MSVC2015 on Windows 10, but it fail with GCC 8.3 on WSL 1 and get undefined reference to test::some_variable
. Qt version is 5.12.1 on WSL 1 and 5.13.1 on Windows 10. What is the problem ?