Closed sirisian closed 4 years ago
I think you forgot this step: https://github.com/Kagami/mpv.js#step-21-compile-64-bit-nacl-host-binaries-on-windows
@Kagami Sorry for the delay. I actually did run that originally and have both the lib files on windows, but it's generating mangled symbols. When I run:
dumpbin /SYMBOLS win_x86_64_host\Release\ppapi_gles2.lib
I see stuff like:
2AF 00000000 SECT3B notype () External | _GLES2CreateProgram@0
The gl2.h clearly uses extern "C" and I've tried even adding extern "C" __declspec( dllexport ) {
along with changing the nacl makefile scripts to simplify the nacl build. Not sure if this mangled thing is causing the linker errors, but I think so. Could be an issue with VS 2019. My C++ is rusty, so this might take a while for me to solve. Not sure if you setup your build environment differently so this didn't happen.
Ahah. I figured it out. I apparently had VS 2019 llvm compilers in my path directory (probably from a previous project) and the makefile was using that or something and generating incompatible lib files. I removed the path to llvm and just had the regular C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64
path in there and it compiled the correct lib with no mangling.
I followed the instructions and didn't have any issues until I ran "node-gyp rebuild". Specifically I'm seeing "error LNK2001: unresolved external symbol GLES2CreateProgram".
The binding.gyp specifically says: "C:/nacl_sdk/pepper_49/lib/win_x86_64_host/Release" and that's where the ppapi_cpp.lib and ppapi_gles2.lib files are located. (I can past the path into file explorer and I see the two files and they're last modified when I made them).
(I have no issues getting this to work with Ubuntu 18.04).