x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Plugin build - not included ws2def.h

Hello,

I have a blank project with a "Plugins" folder and inside my plugin - the dependencies are the following:

 PublicDependencyModuleNames.AddRange(new string[] { "Engine", "Core", "CoreUObject", "Sockets", "Networking" });

Everything works fine when I play the level inside the editor, but as soon as i try to make a package (it doesn't matter if it's DebugGame, Development or Shipping) i have the infamous

 1>C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared\ws2def.h(263): error C2872: 'INT': ambiguous symbol
 1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared\minwindef.h(176): note: could be 'int INT'
 1>  j:\unreal\epic games\4.10\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28): note: or       'DoNotUseOldUE4Type::INT'

And

 1>C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um\winsock2.h(942): error C2872: 'DWORD': ambiguous symbol
 1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared\minwindef.h(156): note: could be 'unsigned long DWORD'
 1>  j:\unreal\epic games\4.10\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(34): note: or       'DoNotUseOldUE4Type::DWORD'

I'm aware of the normal procedure about wrapping the included header as:

  #include "AllowWindowsPlatformTypes.h"
  #include "MyLibraryHeader.h" 
  #include "HideWindowsPlatformTypes.h"

But since I haven't included directly ws2def.h nor winsock2.h, this could be hard to do.

More precisely my includes came all (but "string") from the UEFramework and they are:

 #include "MyPluginPluginPrivatePCH.h"


 #include "MyPluginPluginPrivatePCH.h" 
 #include "MyPluginPlugin.h"


 #include "Networking.h"


 #include "CoreUObject.h"
 #include "Engine.h"
 #include "Delegate.h"
 #include "Http.h"
 #include "Map.h"
 #include "Json.h"
 #include "LatentActions.h"
 #include "Core.h"
 #include "Engine.h"
 #include "SharedPointer.h"
 #include "ModuleManager.h"
 DECLARE_LOG_CATEGORY_EXTERN(MyPluginLog, Log, All);
 #include "IMyPluginPlugin.h"
 #include "MyPluginPlugin.h"
 #include "MyPluginPluginClasses.h"


 #include "ModuleManager.h"


 #include "Engine.h"
 #include "Networking.h"
 #include "GameFramework/Actor.h"
 #include <string>
 #include "MyPlugin.generated.h"

I'm using Visual Studio 2015 Professional Update 2 and Unreal Engine 4.10.4

Do you have any suggestion?

Thank you

Product Version: UE 4.10
Tags:
more ▼

asked May 25 '16 at 05:10 PM in C++ Programming

avatar image

Skia
26 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Found it:

 #include "Http.h"
 

Even if it's from the UEFramework this doesn't mean it's valid and usable to build a plugin... Luckily I wasn't relying too much on it.

more ▼

answered May 26 '16 at 10:03 AM

avatar image

Skia
26 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question