Static Lib with ASIO standalone - C2039 GetObjectW build error

Hello and thanks in advance for any insight offered, extreme ‘hobbyist’ here, apologies upfront for uninformed details below.

I have a static library I’ve created that I wanted to toy around with. It includes a TCP client built using ASIO stand alone. This all works externally to Unreal. I’ve included the ASIO header files within my library.

I’ve brought this into my unreal project. I’ve place my lib and headers in two separate locations and included them in my build.

I can include and build with headers from my library in a cpp file…, unless I include a file that has an ASIO reference within it.
When I try to construct my client in Unreal by including the necessary files I get an error tossed from a file I haven’t touched.

Error C2039 ‘GetObjectW’: is not a member of ‘TScriptInterface’

The error above file is from a cpp file used for interactions in which it is saying this line is in error.

if (UObject* Object = InteractableTarget.GetObject())

Again though, if I remove my include from within another file, no error and everything is a-OK.

So I guess I must be doing something wrong during my ASIO inclusions in my library? Everything works fine outside of UE, so, I’m sure it’s something simple and something that I have done from a lack of understanding.

I found a post that is similar, in that an error is received similar to mine, that seems to indicate an order is the cause but I haven’t been successful trying a different load order.

I guess my short questions would be,
Is including ASIO standalone into my static library (VS 2020) C++20, OK?
Did I follow a correct order to use within UE?
Any glaringly obvious mis-step above?

Thanks for reading and any insights offered.

I was able to sort through this and thought I would post how for others that may stumble upon this.

I ultimately ended up creating a plugin, this is not what solved the error but as a sidenote. I referenced a plugin I use for good build.cs and uplugin settings.

Ultimately I found this post wherein it is mentioned

Windows’ GetObject is actually a define, and makes anything named GetObject (variable, member functions, etc…) fail to compile quite dramatically.

So people often #undef GetObject after #include "windows.h".

I did encounter this a few times today while searching the interwebs, so for me and my original error , the fix was to place an #undef GetObject after my includes that load ASIO standalone. I can now build, loaded up my game and have my asio tcp client working, fun!