Error: Only Win32 target is supported!
-
I've included windows.h (C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include) in my test app and when compiling, the error "Only Win32 target is supported!" shows up followed by redefinition errors.
Any help solving this errors will be appreaciated. Thanks!Build:- Qt 5.14 with mingw 7.3 - 64 Bit, Windows.
-
@Ketan said in Error: Only Win32 target is supported!:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\bin
What do you mean with this path? windows.h file is not located there.
Can you post whole build log?
I can't reproduce the problem with Qt 5.11.1 -
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:9:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\crtdefs.h:10:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include/_mingw.h:268:2: error: Only Win32 target is supported!
#error Only Win32 target is supported!
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include_mingw.h:379:22: error: typedef redefinition with different types ('unsigned int' vs 'unsigned long')
typedef unsigned int size_t;
^
C:\emsdk\emscripten\1.38.27\system\lib\libc\musl\arch\emscripten\bits/alltypes.h:120:24: note: previous definition is here
typedef unsigned _Addr size_t;
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:9:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\crtdefs.h:10:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include_mingw.h:427:13: error: typedef redefinition with different types ('int' vs 'long')
typedef int ptrdiff_t;
^
C:\emsdk\emscripten\1.38.27\system\lib\libc\musl\arch\emscripten\bits/alltypes.h:130:15: note: previous definition is here
typedef _Addr ptrdiff_t;
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:51:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl memcpy_s (void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:190:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/string_s.h:28:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl strerror_s(char *_Buf,size_t _SizeInBytes,int _ErrNum);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:190:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/string_s.h:48:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl memmove_s(void *_dest,size_t _numberOfElements,const void _src,size_t _count);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:50:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\assert.h:17:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:172:10: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
extern __declspec(dllimport) char _sys_errlist[1];
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:173:10: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
extern __declspec(dllimport) int _sys_nerr;
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:50:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\assert.h:17:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:741:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\malloc.h:147:28: error: use of undeclared identifier '_ALLOCA_S_MARKER_SIZE'
_Ptr = (char)_Ptr + _ALLOCA_S_MARKER_SIZE;
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\malloc.h:166:34: error: use of undeclared identifier '_ALLOCA_S_MARKER_SIZE'
_Memory = (char)_Memory - _ALLOCA_S_MARKER_SIZE;
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1150:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP int __cdecl _vswprintf_p(wchar_t * restrict _DstBuf,size_t _MaxCount,const wchar_t * restrict _Format,va_list _ArgList);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1152:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP int __cdecl _vscwprintf_p(const wchar_t * restrict _Format,va_list _ArgList);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1378:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1380:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1384:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1386:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1388:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1524:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/wchar_s.h:28:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _waccess_s (const wchar_t *_Filename,int _AccessMode);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from main.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1524:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/wchar_s.h:29:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wmktemp_s (wchar_t *_TemplateName,size_t _SizeInWords);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:9:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\crtdefs.h:10:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include/_mingw.h:268:2: error: Only Win32 target is supported!
#error Only Win32 target is supported!
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include_mingw.h:379:22: error: typedef redefinition with different types ('unsigned int' vs 'unsigned long')
typedef unsigned int size_t;
^
C:\emsdk\emscripten\1.38.27\system\lib\libc\musl\arch\emscripten\bits/alltypes.h:120:24: note: previous definition is here
typedef unsigned _Addr size_t;
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:9:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\crtdefs.h:10:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include_mingw.h:427:13: error: typedef redefinition with different types ('int' vs 'long')
typedef int ptrdiff_t;
^
C:\emsdk\emscripten\1.38.27\system\lib\libc\musl\arch\emscripten\bits/alltypes.h:130:15: note: previous definition is here
typedef _Addr ptrdiff_t;
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:51:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl memcpy_s (void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:190:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/string_s.h:28:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl strerror_s(char *_Buf,size_t _SizeInBytes,int _ErrNum);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:47:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\utility:202:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\cstring:61:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:190:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\sec_api/string_s.h:48:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl memmove_s(void *_dest,size_t _numberOfElements,const void _src,size_t _count);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:50:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\assert.h:17:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:172:10: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
extern __declspec(dllimport) char _sys_errlist[1];
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:173:10: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
extern __declspec(dllimport) int _sys_nerr;
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:50:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\assert.h:17:
In file included from C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\stdlib.h:741:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\malloc.h:147:28: error: use of undeclared identifier '_ALLOCA_S_MARKER_SIZE'
_Ptr = (char)_Ptr + _ALLOCA_S_MARKER_SIZE;
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\malloc.h:166:34: error: use of undeclared identifier '_ALLOCA_S_MARKER_SIZE'
_Memory = (char)_Memory - _ALLOCA_S_MARKER_SIZE;
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1150:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP int __cdecl _vswprintf_p(wchar_t * restrict _DstBuf,size_t _MaxCount,const wchar_t * restrict _Format,va_list _ArgList);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1152:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP int __cdecl _vscwprintf_p(const wchar_t * restrict _Format,va_list _ArgList);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1378:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
In file included from mainwindow.cpp:1:
In file included from ./mainwindow.h:4:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets\QMainWindow:1:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qmainwindow.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtWidgets/qtwidgetsglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtGui/qtguiglobal.h:43:
In file included from C:\Qt\5.14.1\wasm_32\include\QtCore/qglobal.h:142:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\algorithm:643:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\memory:659:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iterator:416:
In file included from C:\emsdk\emscripten\1.38.27\system\include\libcxx\iosfwd:90:
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\wchar.h:1380:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
_SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
^
C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\string.h:16:17: note: expanded from macro '_SECIMP' -
@Ketan said in Error: Only Win32 target is supported!:
C:\Qt\5.14.1\wasm_32
Looks like you're building for Web Assembly?
-
@jsulm Not an issue.
Yes, we need both emscripten compiler as well as mingw (for windows). Also, I've successfully compiled the test project w/o including windows.h file but failing when included."And I think this windows.h header is not usable in Web Assembly at all." - I'll look into this.