monsieurgustav / UE-OSC

OSC plugin for Unreal Engine 4 Blueprints
MIT License
323 stars 95 forks source link

Implementing BasicOscReceiver into another class #52

Closed MatzeOGH closed 5 years ago

MatzeOGH commented 7 years ago

I have been trying to add the BasicOscReceiver to a couple of my own classes in another plugin.

I added OSC to the private dependencies of my plugin but I always get the following error

error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl BasicOscReceiver<class UPropNetDevice>::BasicOscReceiver<class UPropNetDevice>(class UPropNetDevice *)" (__imp_??0?$BasicOscReceiver@VUPropNetDevice@@@@QEAA@PEAVUPropNetDevice@@@Z) referenced in function "public: __cdecl UPropNetDevice::UPropNetDevice(class FVTableHelper &)" (??0UPropNetDevice@@QEAA@AEAVFVTableHelper@@@Z) 2>Module.PropNetConfig.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl BasicOscReceiver<class UPropNetDevice>::~BasicOscReceiver<class UPropNetDevice>(void)" (__imp_??1?$BasicOscReceiver@VUPropNetDevice@@@@UEAA@XZ) referenced in function "intpublic: cdecl UPropNetDevice::UPropNetDevice(class FVTableHelper &)'::`1'::dtor$1" (?dtor$1@?0???0UPropNetDevice@@QEAA@AEAVFVTableHelper@@@Z@4HA) 2>Module.PropNetConfig.gen.cpp.obj : error LNK2001: unresolved external symbol "declspec(dllimport) public: virtual cdecl BasicOscReceiver::~BasicOscReceiver(void)" (imp_??1?$BasicOscReceiver@VUPropNetDevice@@@@UEAA@XZ)`

The UPropNetDevice is an UObject . Does anybody know what might cause this issue?

monsieurgustav commented 6 years ago

Hi! Sorry, I totally missed your issue...

You probably have figured it out now, but: the reason is BasicOscReceiver is in the "Private" folder, thus not accessible to use by foreign code. There is no technical reason for that, you could as well put it in "Public" and it should work.

Guillaume