bluesadi / Pluto

Obfuscator based on LLVM 14.0.6
831 stars 185 forks source link

Obfuscation/MBAUtils.h:1:10: fatal error: 'z3++.h' file not found #12

Closed HuErr closed 2 years ago

HuErr commented 2 years ago

按照看雪的教程编译win ndk,但是出现这个,我已经安装了 sudo apt install libz3-dev ,测试没有用。我又在 ~/llvm-toolchain/toolchain/llvm-project/llvm/lib/Transforms/IPO/CMakeLists.txt 中添加了,也没起到作用。

include_directories ("/usr/include/") link_directories("/usr/lib/x86_64-linux-gnu/")

bluesadi commented 2 years ago

已修复,现在用Eigen代替了z3,Eigen是一个全部由头文件组成的库,可以直接塞到include目录,所以不会出现z3那样的环境问题: See: https://github.com/bluesadi/Pluto-Obfuscator/tree/main/llvm/include/Eigen https://github.com/bluesadi/Pluto-Obfuscator/blob/main/llvm/lib/Transforms/Obfuscation/MBAUtils.cpp

lasting-yang commented 7 months ago

我的ubuntu已经使用以下命令安装z3,还是会提示z3++.h file not found

sudo apt install libz3-dev 

后来进行了如下修改,编译通过 llvm/lib/Transforms/Obfuscation/CMakeLists.txt

find_package(z3 REQUIRED)

add_llvm_component_library(LLVMObfuscation
  HelloWorld.cpp
  CryptoUtils.cpp
  Flattening.cpp
  MBAUtils.cpp
  MBAObfuscation.cpp
  Substitution.cpp
  IndirectCall.cpp
  BogusControlFlow.cpp
  GlobalEncryption.cpp
  Pipeline.cpp

  LINK_COMPONENTS
  Core
  Support
  Analysis
  TransformUtils

  LINK_LIBS
  ${Z3_LIBRARIES}
  )