Skip to content

"No Target Architecture" when compiling libcxxwrap-julia using MSVC #34201

@barche

Description

@barche

When compiling against the Julia nightlies using MSVC, the following error appears:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winnt.h(154,1): fatal error C1189: #error:  "No Target Architecture" [C:\projects\libcxxwrap-julia\build\cxxwrap_julia.vcxproj]

This comes from including errhandlingapi.h directly, here:

#include <errhandlingapi.h>

On my local machine, I found a crude workaround, but I doubt this will work in all cases:

#ifdef _OS_WINDOWS_

#define DWORD unsigned long
extern "C" __declspec(dllimport) DWORD __stdcall GetLastError();
extern "C" __declspec(dllimport) void __stdcall SetLastError(DWORD dwErrCode);

#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildingBuild system, or building Julia or its dependenciessystem:windowsAffects only Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions