Creating c++ DLL including third party SDK

I am trying to get a third party reconstruction library ReconstructMe working by creating a c++ dll and call it within unity(c#).

I have get it working using supplied dll but calling unmanaged function calls are hitting performance on every update for multiple functions e.g:

on every update I am calling below necessary calls:


For optimization, the idea is if I can make a new DLL including all above functions, calls and this DLL import function will call once per update from unity(c#) or may be call it just once and get data from callbacks.

I have simply used below code to check if I am able to get it working, unfortunately I am getting LNK2019:

RemeDLL.obj : error LNK2019: unresolved external symbol __imp_reme_context_create referenced in function “private: void __cdecl RemeDLL::StartScan(void)” (?StartScan@RemeDLL@@AEAAXXZ)
1>c:ProjectsRemeDLLx64DebugRemeDLL.dll : fatal error LNK1120: 1 unresolved externals

#include <iostream>
#include <reconstructmesdk/reme.h>
using namespace std;

class RemeDLL
    __declspec(dllexport) void StartScan()
        // Create a new context
        reme_context_t context;

Here are definitions from SDK:

typedef struct _reme_context* reme_context_t;

reme_error_t reme_context_create(reme_context_t *c);


Can someone please suggest or give pointers how can I go around this ? Do I need some kind of layers for linking dll to import first and then call dll to export function, please advice. Thanks.

Source: dll

Leave a Reply