Skip to content

Instantly share code, notes, and snippets.

@blue-devil
Created November 1, 2023 09:06
Show Gist options
  • Save blue-devil/6a2170a4bb96c573d9eb9f4a5f984339 to your computer and use it in GitHub Desktop.
Save blue-devil/6a2170a4bb96c573d9eb9f4a5f984339 to your computer and use it in GitHub Desktop.
Lost pycdc build instructions

Lost pycdc build instructions

How to build on windows

Requirements: Visual Studio and CMake. Run the commands below under

"Developer Command Prompt VS 2022"

git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build
mkdir build/win11-arm
cmake -S .\ -B .\build\win11-arm
cmake --build .\build\win11-arm --config Release

After commands above we will have both built binaries and also a solution for the project.

How to build on linux

Requirements: CMake

git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build
mkdir build/lin-arm
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/lin-arm
cmake --build ./build/lin-arm

We can build pycdc for Windows on Linux for both 32bit and 64bit

git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build
mkdir build/win-x86_32
cmake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ -DCMAKE_CXX_STANDARD_LIBRARIES="-static-libgcc -static-libstdc++" -S ./ -B ./build/win-x86_32

make -C ./build/win-x86_32

64-bit:

git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build
mkdir build/win-x86_64
cmake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_CXX_STANDARD_LIBRARIES="-static-libgcc -static-libstdc++" -S ./ -B ./build/win-x86_64

make -C ./build/win-x86_64

How to build on macOS

Requirements: CMake. You can install cmake using brew: brew install --cask cmake

git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build
mkdir build/mac-arm
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/mac-arm64/
cmake --build ./build/mac-arm64

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment