bluesadi / Pluto

Obfuscator based on LLVM 14.0.6
831 stars 185 forks source link

Error compiling under windows #19

Open tygoodshares opened 2 years ago

tygoodshares commented 2 years ago

I try visual studio 2022 and 2019 command line

C:\Users\frosty\Documents\pluto\Pluto-Obfuscator\build>cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DBUILD_SHARED_LIBS=On ../llvm -- The C compiler identification is MSVC 19.29.30137.0 -- The CXX compiler identification is MSVC 19.29.30137.0 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- clang project is enabled -- clang-tools-extra project is disabled -- compiler-rt project is disabled -- debuginfo-tests project is disabled -- libc project is disabled -- libclc project is disabled -- libcxx project is disabled -- libcxxabi project is disabled -- libunwind project is disabled -- lld project is disabled -- lldb project is disabled -- mlir project is disabled -- openmp project is disabled -- parallel-libs project is disabled -- polly project is disabled -- pstl project is disabled -- flang project is disabled DEBUG: OFF CMake Error at CMakeLists.txt:595 (message): BUILD_SHARED_LIBS options is not supported on Windows.

-- Configuring incomplete, errors occurred!

and same for visual studio project file generate

C:\Users\frosty\Documents\pluto\Pluto-Obfuscator\build>cmake -G "Visual Studio 16 2019" -DLLVM_ENABLE_PROJECTS="clang"-DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DBUILD_SHARED_LIBS=On ../llvm CMake Warning at CMakeLists.txt:26 (message): Visual Studio generators use the x86 host compiler by default, even for 64-bit targets. This can result in linker instability and out of memory errors. To use the 64-bit host compiler, pass -Thost=x64 on the CMake command line.

-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043. -- The C compiler identification is MSVC 19.29.30137.0 -- The CXX compiler identification is MSVC 19.29.30137.0 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- clang project is disabled -- clang-tools-extra project is disabled -- compiler-rt project is disabled -- debuginfo-tests project is disabled -- libc project is disabled -- libclc project is disabled -- libcxx project is disabled -- libcxxabi project is disabled -- libunwind project is disabled -- lld project is disabled -- lldb project is disabled -- mlir project is disabled -- openmp project is disabled -- parallel-libs project is disabled -- polly project is disabled -- pstl project is disabled -- flang project is disabled DEBUG: OFF CMake Error at CMakeLists.txt:595 (message): BUILD_SHARED_LIBS options is not supported on Windows.

-- Configuring incomplete, errors occurred! See also "C:/Users/frosty/Documents/pluto/Pluto-Obfuscator/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/frosty/Documents/pluto/Pluto-Obfuscator/build/CMakeFiles/CMakeError.log".

GWOSTIK commented 2 years ago

BUILD_SHARED_LIBS options is not supported on Windows

Set BUILD_SHARED_LIBS to OFF

Jhinxs commented 2 years ago

https://jhinxs.com/ollvm-windows%E4%B8%8B%E7%BC%96%E8%AF%91%E5%8F%8Avs%E9%9B%86%E6%88%90/#pluto-obfuscator
Try check this