-1

I am using an open sourced script from github which contains the following lines at the top:

#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")

However, when I try to build it, it shows the following error:

fatal error: urlmon.h: No such file or directory

I have looked around for hours upon hours but there are no solutions I can find.

Axqua
  • 21
  • 3

1 Answers1

2

This header contains functions used by the Microsoft Component Object Model (COM) and the Windows Shell.

https://learn.microsoft.com/en-us/windows/win32/api/urlmon/

You need to setup your environment for Win32 development

https://learn.microsoft.com/en-us/windows/win32/desktop-programming

  • How can I fix this error then? – Axqua Dec 21 '21 at 02:31
  • @Axqua if you follow the link you see it's part of the Win32 API. Two more clicks and you reach this page: https://learn.microsoft.com/en-us/windows/win32/desktop-programming – bolov Dec 21 '21 at 02:38
  • @bolov I understand that this is related. However, I don't know how to exactly fix the problem. – Axqua Dec 21 '21 at 02:41
  • @Axqua you set up Win32 as described on the page – bolov Dec 21 '21 at 03:13
  • 1
    @Jellyboy Urlmon **uses** COM, it is not **part of** COM. Two different technologies. – Remy Lebeau Dec 21 '21 at 05:57
  • @Axqua Can I guess that you cloned this repo on Linux? This library is likely Windows only. –  Dec 21 '21 at 07:13
  • @Jellyboy Incorrect. I am currently on Windows 10 and very confused why this problem is occuring. – Axqua Dec 21 '21 at 12:32
  • @Axqua because either you don't have an environment setup for Windows development, or it is outdated. We don't know, because you haven't provided any details about it yet. – Remy Lebeau Dec 21 '21 at 15:56
  • @Axqua Check if you have your environment setup: https://learn.microsoft.com/en-us/windows/win32/desktop-programming –  Dec 21 '21 at 17:00