boostorg / dll

Library for comfortable work with DLL and DSO
https://boost.org/libs/dll
52 stars 43 forks source link

Can't import a function with an array parameter (MSVC) #64

Open db4 opened 1 year ago

db4 commented 1 year ago

Consider the following example:

boostdll::experimental::smart_library lib;
lib.load("test.dll");

int f(char a[]);
decltype(f)* pf = lib.get_function<decltype(f)>("f");

This fails to find function f as it's demangled as int __cdecl f(char * __ptr64 const), but MSVC parser doesn't accept that trailing const