Download

Packaging Plugin with third party Dll

I’m writing a tactile plugin in order to add more gesture to the flow

When I’m using it in the editor (C++ project), everything works fine

but when i want to package it, it has some issue

it doesn’t at first find my other dll then i use an interface with



UINTERFACE(NotBlueprintable)
class UTouchItInterface : public UInterface
{
    GENERATED_UINTERFACE_BODY()
};

class ITouchItInterface
{
    GENERATED_IINTERFACE_BODY()

public:

    ITouchItInterface();

    virtual void BeginDestroy();

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItSwipe(int32 x, int32 y, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItPan(int32 x, int32 y, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItPinch(float ratio, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItTwist(float angle, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItShortTap(int numberOfTap, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItLongTap(int numberOfTap, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItShake(int numberOfBackAndForth, const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItShortPress(const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItLongPress(const TArray<FTouchItFingerCoordinates> & fingers);

    UFUNCTION(BlueprintImplementableEvent, Category = "Itekube")
    void TouchItFingersOccured(const TArray<FTouchItFinger> & fingers);

    void fingerCBack(IT3CP_FingerOutput * fingers, int fingersNumber);

    void gestureCBack(const IT3CP_GestureOutput & gesture);

protected:

    void buildIt3cp();

    IT3CP it3cp_;

    bool blockMessages_;
};


then I get

UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol “void __cdecl EmptyLinkFunctionForGeneratedCodeTouchItInterface(void)” (?EmptyLinkFunctionForGeneratedCodeTouchItInterface@@YAXXZ) referenced in function “void __cdecl UELinkerFixups(void)” (?UELinkerFixups@@YAXXZ)

kind or error

there is a huge difference between editor and packaging !

and what about if i have a bt project ??

hi,
By default UE does not package the thirdparty dll, you have to do it in the Build.cs file from your plugin, something like this:



if (Target.Platform == UnrealTargetPlatform.Win64)
{
    RuntimeDependencies.Add(new RuntimeDependency(Path.Combine("YOUR PATH", "YOUR DLL.dll")));
}


thanks a lot, it works !

FilterPlugin.ini in folder Config?

but these code did not worked for me.when i debugging in the VisualStudio,It runs perfectly,but i packaged it,it sucks. so headachy* about this bug.*

Double check this, maybe your plugin hasn’t been packaged at all, this is the method we use since the beginning of time, I think

Hi all,
Attempting to follow this advice for packaging an external plugin into my project.
If my plugin has multiple .dll files, do you just include all of them in the argument?
Am i placing this argument in the build.cs of my UE4 project or my plugin? THanks!

Copy your DLL to your Binaries/Win64 folder and add the following to your build.cs file:


 if (Target.Platform == UnrealTargetPlatform.Win64)
        {  
           PublicAdditionalLibraries.Add(@"D:/PerforceRepo/FormUDPClient/SQLLite3/sqlite3.lib"); 
           RuntimeDependencies.Add(@"D:/PerforceRepo/FormUDPClient/Binaries/Win64/sqlite3.dll");
        }


Creating a new RuntimeDependency as suggested above is now obsolete and will give you an error