ProEns08
ProEns08

Reputation: 1914

api-ms-win-core-synch-l1-2-1.dll is missing from your computer

I am developing a C/C++ application using Visual Studio Community 2015.

I used to build my application the system library: OneCoreUAP.lib. I am using Windows 8.1.

I used the function if_nametoindex defined in https://msdn.microsoft.com/en-us/library/windows/hardware/ff553788%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

In the link they specifies that you require ONeCOreUAP.lib

but I found Another links that indicates another library: Iphlpapi.lib: https://msdn.microsoft.com/en-us/library/windows/desktop/bb408409%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

When launching my app I getting the following error:

The program can't start because api-ms-win-core-synch-l1-2-1.dll is missing from your computer. 
Try reinstalling the program to fix this problem.

This is the message image: api-ms-win-core-synch-l1-2-1.dll is missing from your computer

When searching the dll, I know from the this link: https://msdn.microsoft.com/en-us/library/windows/desktop/mt657574(v=vs.85).aspx

that:

Introduced into api-ms-win-core-synch-l1-2-1.dll in Windows 10.0.10240.0

I tried to update the Windows 10 SDK, But this did not solve the problem.

How to solve the problem? Should I upgrade my windows 8.1 to windows 10 to solve it?

Upvotes: 3

Views: 15153

Answers (1)

andlabs
andlabs

Reputation: 11588

The page you found appears to have to do with Windows drivers that link against the Universal App Platform runtime, which is only available in Windows 10 and up. OneCoreUAP.lib is the .lib file that represents the UAP runtime. If someone who knows more about this could enlighten me on the specifics of this, that would be helpful; I don't fully understand what's going on or how and hwy it works.

You are not writing one of these; instead, you are writing a desktop program. So instead, you want to look at the desktop program documentation. Usually this is the first thing that Googling for the function name in question will get you. In your case, this is that page, and at the bottom of the page it says the function can be found in Iphlpapi.lib, so you must link aganst that .lib file instead.

The bottom of that page also says the function was introduced no later than Windows Vista, so you are able to use it on 8.1.

Upvotes: 1

Related Questions