binexport icon indicating copy to clipboard operation
binexport copied to clipboard

Plugin module 'C:\Users\...\plugins\binexport12_binaryninja.dll' failed to load

Open Adikesha opened this issue 8 months ago • 3 comments

Hi guys,

I managed to compile binexport plugin for Binary Ninja on Windows. But I keep getting "Plugin module 'C:\Users...\plugins\binexport12_binaryninja.dll' failed to load". I enabled debug log but still it does not give enough information of why it failed to load. Any pointers?

Thanks. Adik

Adikesha avatar Apr 18 '25 22:04 Adikesha

The ABI in the main branch is pretty out of date. This branch should work with 5.x now, although I couldn't get it to build

jessica0f0116 avatar Jun 03 '25 06:06 jessica0f0116

Hi! I have a small guide on how to compile a plugin for Windows. It is not very stable and I am not completely sure that everything is correct, but nevertheless it works. The only thing is that I do not use the latest version, but one of the previous ones for compilation.

  1. Download or clone the repository https://github.com/google/binexport (The latest version works poorly, there is an error with boost, take the version binexport-12-20240417-ghidra_11.0.3 from the binexport_code archive)

  2. Create a directory third_party\binaryninja-api in the project directory

  3. Clone the repository with git api binary ninja there: git clone --recursive --branch dev https://github.com/Vector35/binaryninja-api.git PATH_TO\binexport\third_party\binaryninja-api

  4. Switch to a tag with "Stable": 3.1 Determine existing tags with "stable" git tag --sort=-creatordate | findstr stable 3.2 Take the latest stable commit corresponding to the version of Binary Ninja and switch the repository to it: git checkout %TAG% 3.3 Get the hash of this commit: git rev-parse HEAD

  5. Change dependencies: PATH_TO\binexport\cmake\BinExportDeps.cmake:

if(BINEXPORT_ENABLE_BINARYNINJA)
if(BINEXPORT_BINARYNINJA_CHANNEL STREQUAL "stable")
set(_binexport_binaryninjacore_suffix "_stable")
set(_binexport_binaryninja_git_tag
"9229ebde590febc9635d824ae9284ae170dee9da") # 2024-11-20 v4.2.6455 <---- Here (line 92)
else()
set(_binexport_binaryninjacore_suffix "")
set(_binexport_binaryninja_git_tag
"1208662536039325106917208339208590767363") # 2025-03-05 <---- Here (line 96)
endif()
(You either need to change everything to the stable branch or figure out where to set it with BINEXPORT_BINARYNINJA_CHANNEL)
  1. Run the script: PATH_TO\binexport\binaryninja\stubs\regenerate-api-stubs.sh PATH_TO\third_party\binaryninja-api
  2. Rename the created files "binaryninjacore.cc" to "binaryninjacore_stable.cc" (If you are building a version for stable)
  3. Create a folder "PATH_TO\binexport\build_msvc"
  4. Go to it and execute the commands sequentially: 8.1 Configuring the build:
cmake .. ^
-G "Visual Studio 17 2022" ^
-DCMAKE_BUILD_TYPE=Release ^
"-DCMAKE_INSTALL_PREFIX=%cd%" ^
-DBINEXPORT_ENABLE_IDAPRO=OFF ^
-DIdaSdk_ROOT_DIR=%cd%\..\third_party\idasdk ^
-DBINEXPORT_ENABLE_BINARYNINJA=ON

8.2 Building the project: cmake --build . --config Release -- /m /clp:NoSummary;ForceNoAlign /v:minimal

8.3 Run tests ctest --build-config Release --output-on-failure

8.4 Build the library cmake --install . --config Release --strip

8.5 The plugin is located in \build_msvc\binaryninja\Release

P.s These actions appeared as a result of several hours of searching on various issues related to the problems of the binaryninja plugin. Despite the fact that it is pathetic, I have already compiled 4 releases of binary ninja using this scenario and the plugin loads successfully.

Ter0ID avatar Jul 07 '25 07:07 Ter0ID

Binary Ninja 5 now ships with built-in BinExport.

cblichmann avatar Sep 04 '25 11:09 cblichmann