kiyolee / pcre2-win-build

pcre2 Windows build with Visual Studio.
Other
32 stars 12 forks source link

Could not find the entrypoint _pcre2_compile@40. (3260) #1

Closed lievencardoen closed 2 years ago

lievencardoen commented 2 years ago

Hi, I'm trying to use the libpcre2-8.dll (built with the VS2022 solution) from an ABL Application (old 4GL Language).

I'm constantly hitting the error

Could not find the entrypoint _pcre2_compile@40. (3260)

I've been searching the internet for a day now and I can't seem to figure out why I'm getting this error.

Anybody? I do see that __declspec(dllexport) is set so ...

Also had a look with dependency walker and the functions are visible.

kiyolee commented 2 years ago

If you check the exported entry points from libpcre2-8.dll (use dumpbin command), you can see the entry point name should be pcre2_compile_8 instead of _pcre2_compile@40. I have no idea how your entry point name comes by as such.

kiyolee commented 2 years ago

The name-decoration convention like _foobar@12 is a consequence of using __stdcall calling convention. See here for more information. The code here is compiled using default __cdecl calling convention and hence the simpler entry point names.

lievencardoen commented 2 years ago

If you check the exported entry points from libpcre2-8.dll (use dumpbin command), you can see the entry point name should be pcre2_compile_8 instead of _pcre2_compile@40. I have no idea how your entry point name comes by as such.

Thx. so pcre2_compile_8 is expected as entry point? I just downloaded the Git Repo and built the VS2022 Solution as is.

lievencardoen commented 2 years ago

Using pcre2_compile_8 instead of pcre2_compile does work. Thx for the anwser.