Third party library causing windows.h error

Hi, I am trying to use the libssh library in my project. After having added the necessary lines in the .Build.cs file, following the guide Linking Static Libraries Using The Build, building the project causes the following error : “You have included windows.h before MinWindows.h All useless stuff from windows headers won’t be excluded”. Removing “PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, “libssh”, “Includes”));” fixes the problem which leads me to believe that the include files of libssh are the cause of the problem. But I have no idea how to fix this. Does anyone know how to fix this? I need to fix this ASAP. Please help

Hey, have you tried to #include “MinWindows.h” BEFORE “Windows.h”? Since this is what your message is telling you…



#pragma once

#include "MinWindows.h"
#include "Windows.h"

#include <libssh-stuff>



Hi, thanks for the reply. The problem seems to be caused by one of the library’s header file called string.h which I am guessing clashes with an existing header file of the same name…? Anyway, I have decided to use a different library so problem solved. Thanks again for the reply.