Skip to content

Mozjpeg static cjpeg binary doesn't work without dlls on Windows #436

@MateuszKrawczuk

Description

@MateuszKrawczuk

Static build shouldn't requires copy dlls with binary when it is build using Microsoft Visual Studio Build Tools.

Reproduction steps:

  1. Install cmake and nasm (You can use scoop install cmake nasm)
  2. Clone Mozjpeg
  3. Clone vcpkg into mozjpeg and enter mozjpeg
  4. vcpkg/bootstrap-vcpkg.bat
  5. vcpkg install --triplet x64-windows libpng:x64-windows-static zlib:x64-windows-static libpng zlib
  6. cmake -DCMAKE_TOOLCHAIN_FILE="C:\path\to\mozjpeg\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release .
  7. cmake --build . --config Release
  8. Run cjpeg-static.exe -version and see version and build versions
  9. Copy only cjpeg-static.exe from release folder to any directory
  10. Try launch cjpeg-static.exe -version and see there is no result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions