当我将Windows SDK升级到17763时,我发现无法编译我的项目,并且收到错误消息为“ midl:错误MIDL9008:内部编译器问题-请参阅文档,以获取有关如何找到解决方法的建议。 ”。输出如下:
1>Note: The Microsoft.Windows.CppWinRT Nuget package provides improved C++/WinRT project build support.
1>64 bit MIDLRT Processing G:\NagisaRepositories\Nagisa\Assassin\CustomConverter.idl
1>CustomConverter.idl
1>64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt\winrtbase.idl
1>winrtbase.idl
1>64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt\midlbase.idl
1>midlbase.idl
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ai.machinelearning.machinelearningcontract\1.0.0.0\windows.ai.machinelearning.machinelearningcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ai.machinelearning.preview.machinelearningpreviewcontract\2.0.0.0\windows.ai.machinelearning.preview.machinelearningpreviewcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.background.callsbackgroundcontract\1.0.0.0\windows.applicationmodel.calls.background.callsbackgroundcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.callsphonecontract\4.0.0.0\windows.applicationmodel.calls.callsphonecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.callsvoipcontract\4.0.0.0\windows.applicationmodel.calls.callsvoipcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.communicationblocking.communicationblockingcontract\2.0.0.0\windows.applicationmodel.communicationblocking.communicationblockingcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.socialinfo.socialinfocontract\2.0.0.0\windows.applicationmodel.socialinfo.socialinfocontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.startuptaskcontract\3.0.0.0\windows.applicationmodel.startuptaskcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.custom.customdevicecontract\1.0.0.0\windows.devices.custom.customdevicecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.deviceslowlevelcontract\3.0.0.0\windows.devices.deviceslowlevelcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.printers.printerscontract\1.0.0.0\windows.devices.printers.printerscontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.smartcards.smartcardbackgroundtriggercontract\3.0.0.0\windows.devices.smartcards.smartcardbackgroundtriggercontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.smartcards.smartcardemulatorcontract\6.0.0.0\windows.devices.smartcards.smartcardemulatorcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.foundation.foundationcontract\3.0.0.0\windows.foundation.foundationcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.foundation.universalapicontract\7.0.0.0\windows.foundation.universalapicontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.gaming.xboxlive.storageapicontract\1.0.0.0\windows.gaming.xboxlive.storageapicontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.graphics.printing3d.printing3dcontract\4.0.0.0\windows.graphics.printing3d.printing3dcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.networking.connectivity.wwancontract\2.0.0.0\windows.networking.connectivity.wwancontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.networking.sockets.controlchanneltriggercontract\3.0.0.0\windows.networking.sockets.controlchanneltriggercontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.maps.guidancecontract\3.0.0.0\windows.services.maps.guidancecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.maps.localsearchcontract\4.0.0.0\windows.services.maps.localsearchcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.store.storecontract\4.0.0.0\windows.services.store.storecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.targetedcontent.targetedcontentcontract\1.0.0.0\windows.services.targetedcontent.targetedcontentcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.profilehardwaretokencontract\1.0.0.0\windows.system.profile.profilehardwaretokencontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.profilesharedmodecontract\2.0.0.0\windows.system.profile.profilesharedmodecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.systemmanufacturers.systemmanufacturerscontract\3.0.0.0\windows.system.profile.systemmanufacturers.systemmanufacturerscontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.systemmanagementcontract\6.0.0.0\windows.system.systemmanagementcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ui.viewmanagement.viewmanagementviewscalingcontract\1.0.0.0\windows.ui.viewmanagement.viewmanagementviewscalingcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ui.xaml.core.direct.xamldirectcontract\1.0.0.0\windows.ui.xaml.core.direct.xamldirectcontract.winmd
1>64 bit MIDLRT Processing G:\NagisaRepositories\Nagisa\Assassin\TransferManager.idl
1>TransferManager.idl
1>64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt\winrtbase.idl
1>winrtbase.idl
1>64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt\midlbase.idl
1>midlbase.idl
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ai.machinelearning.machinelearningcontract\1.0.0.0\windows.ai.machinelearning.machinelearningcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ai.machinelearning.preview.machinelearningpreviewcontract\2.0.0.0\windows.ai.machinelearning.preview.machinelearningpreviewcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.background.callsbackgroundcontract\1.0.0.0\windows.applicationmodel.calls.background.callsbackgroundcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.callsphonecontract\4.0.0.0\windows.applicationmodel.calls.callsphonecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.calls.callsvoipcontract\4.0.0.0\windows.applicationmodel.calls.callsvoipcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.communicationblocking.communicationblockingcontract\2.0.0.0\windows.applicationmodel.communicationblocking.communicationblockingcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.socialinfo.socialinfocontract\2.0.0.0\windows.applicationmodel.socialinfo.socialinfocontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.applicationmodel.startuptaskcontract\3.0.0.0\windows.applicationmodel.startuptaskcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.custom.customdevicecontract\1.0.0.0\windows.devices.custom.customdevicecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.deviceslowlevelcontract\3.0.0.0\windows.devices.deviceslowlevelcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.printers.printerscontract\1.0.0.0\windows.devices.printers.printerscontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.smartcards.smartcardbackgroundtriggercontract\3.0.0.0\windows.devices.smartcards.smartcardbackgroundtriggercontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.devices.smartcards.smartcardemulatorcontract\6.0.0.0\windows.devices.smartcards.smartcardemulatorcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.foundation.foundationcontract\3.0.0.0\windows.foundation.foundationcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.foundation.universalapicontract\7.0.0.0\windows.foundation.universalapicontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.gaming.xboxlive.storageapicontract\1.0.0.0\windows.gaming.xboxlive.storageapicontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.graphics.printing3d.printing3dcontract\4.0.0.0\windows.graphics.printing3d.printing3dcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.networking.connectivity.wwancontract\2.0.0.0\windows.networking.connectivity.wwancontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.networking.sockets.controlchanneltriggercontract\3.0.0.0\windows.networking.sockets.controlchanneltriggercontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.maps.guidancecontract\3.0.0.0\windows.services.maps.guidancecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.maps.localsearchcontract\4.0.0.0\windows.services.maps.localsearchcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.store.storecontract\4.0.0.0\windows.services.store.storecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.services.targetedcontent.targetedcontentcontract\1.0.0.0\windows.services.targetedcontent.targetedcontentcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.profilehardwaretokencontract\1.0.0.0\windows.system.profile.profilehardwaretokencontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.profilesharedmodecontract\2.0.0.0\windows.system.profile.profilesharedmodecontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.profile.systemmanufacturers.systemmanufacturerscontract\3.0.0.0\windows.system.profile.systemmanufacturers.systemmanufacturerscontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.system.systemmanagementcontract\6.0.0.0\windows.system.systemmanagementcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ui.viewmanagement.viewmanagementviewscalingcontract\1.0.0.0\windows.ui.viewmanagement.viewmanagementviewscalingcontract.winmd
1>Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.17763.0\windows.ui.xaml.core.direct.xamldirectcontract\1.0.0.0\windows.ui.xaml.core.direct.xamldirectcontract.winmd
1>
1>midl : error MIDL9008: internal compiler problem - See documentation for suggestions on how to find a workaround.
1>midl: Assertion failed: false, file com\rpc\midl\midlrt\inc\nodeskl.hxx, line 4884
我试图解决该问题,并且发现如果删除接口的定义,它将可以成功编译。但是我需要这些定义,因为它很重要。这是我删除的IDL定义。
/******************************************************************************
Project: Assassin
Description: Definition for the TransferManager.
File Name: TransferManager.idl
License: The MIT License
******************************************************************************/
namespace Assassin
{
enum TransferTaskStatus
{
Canceled = 0,
Completed = 1,
Error = 2,
Paused = 3,
Queued = 4,
Running = 5
};
[version(1.0)]
[uuid(B70ACDED-7354-3082-BF73-D931D80C047B)]
interface ITransferTask : IInspectable
requires Windows.UI.Xaml.Data.INotifyPropertyChanged
{
// Gets the Guid string of the task.
String Guid
{
get;
};
// Gets the URI which to download the file.
Windows.Foundation.Uri SourceUri
{
get;
};
// Gets the file name which to download the file.
String FileName
{
get;
};
// Gets the save file object which to download the file.
Windows.Storage.IStorageFile SaveFile
{
get;
};
// Gets the save folder object which to download the file.
Windows.Storage.IStorageFolder SaveFolder
{
get;
};
// The current status of the task.
TransferTaskStatus Status
{
get;
};
// The total number of bytes received. This value does not include
// bytes received as response headers. If the task has restarted,
// this value may be smaller than in the previous progress report.
UInt64 BytesReceived
{
get;
};
// The speed of bytes received in one second.
UInt64 BytesReceivedSpeed
{
get;
};
// The remain time, in seconds.
UInt64 RemainTime
{
get;
};
// The total number of bytes of data to download. If this number is
// unknown, this value is set to 0.
UInt64 TotalBytesToReceive
{
get;
};
// Pauses a download operation.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void Pause();
// Resumes a paused download operation.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void Resume();
// Cancels a download operation.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void Cancel();
}
typedef Windows.Foundation.Collections.IVectorView<ITransferTask> ITransferTaskVector;
[version(1.0)]
[uuid(976D09B5-65EE-39DE-9C00-26E47D6538D7)]
interface ITransferManager : IInspectable
requires
Windows.Foundation.IClosable,
Windows.UI.Xaml.Data.INotifyPropertyChanged
{
// Gets the version of Nagisa.
String Version
{
get;
};
// Gets or sets the filter to use for searching the task list.
String SearchFilter
{
get;
set;
};
// Gets the last used folder.
Windows.Storage.IStorageFolder LastusedFolder
{
get;
};
// Gets or sets the default download folder.
Windows.Storage.IStorageFolder DefaultFolder
{
get;
set;
};
// Gets the total download bandwidth.
UInt64 TotalDownloadBandwidth
{
get;
};
// Gets the total upload bandwidth.
UInt64 TotalUploadBandwidth
{
get;
};
// Gets the task list.
// Parameters:
// The function does not have parameters.
// Return value:
// Returns an object which represents the task list.
Windows.Foundation.IAsyncOperation<ITransferTaskVector> GetTasksAsync();
// Add a task to the task list.
// Parameters:
// SourceUri: The source uri object of task.
// DesiredFileName: The file name you desire.
// SaveFolder: The object of the folder which you want to save.
// Return value:
// Returns an asynchronous object used to wait.
Windows.Foundation.IAsyncAction AddTaskAsync(
Windows.Foundation.Uri SourceUri,
String DesiredFileName,
Windows.Storage.IStorageFolder SaveFolder);
// Removes a task to the task list.
// Parameters:
// Task: The task object.
// Return value:
// Returns an asynchronous object used to wait.
Windows.Foundation.IAsyncAction RemoveTaskAsync(
ITransferTask Task);
// Start all tasks.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void StartAllTasks();
// Pause all tasks.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void PauseAllTasks();
// Clears the task list.
// Parameters:
// The function does not have parameters.
// Return value:
// The function does not return a value.
void ClearTaskList();
}
[version(1.0)]
runtimeclass TransferManager :
[default] ITransferManager
{
// Creates a new TransferManager object.
// Parameters:
// EnableUINotify: Enable the UI notify timer if true.
// Return value:
// The function does not return a value.
TransferManager(
Boolean EnableUINotify);
}
}
我想知道是什么原因造成的,是我的故障还是Windows SDK的故障。
答案 0 :(得分:1)
几天后,我一直在努力寻找解决方案来解决这个问题,结果解决方法非常简单:
#if CURL_AT_LEAST_VERSION(5, 1, 0)
// lua >=5.1-specific code
luaL_openlibs(luaState);
#else
// lua < 5.1-specific code
lua_openlibs(luaState);
#endif
上面的typedef可以放入一个单独的共享.idl文件中,当需要外部接口派生时可以将其包括在内。
答案 1 :(得分:0)
我想知道是什么原因造成的,是我的故障还是Windows SDK的故障。
这是最新Windows SDK附带的MIDL编译器中的一个已知错误。