Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tutorial: compile for Windows on Linux with MinGW (cross compile) #168

Closed
Labels
buildBuild related issues
@Topping1

Description

@Topping1

First, install MinGW
sudo apt install g++-mingw-w64-x86-64-posix
sudo apt install gcc-mingw-w64-x86-64-posix

Then, clone the repository
git clone https://github.com/ggerganov/whisper.cpp

  • then, for compilation, we need to modify the pthread flag and static linklibgcc andlibstdc++ as follows:

x86_64-w64-mingw32-gcc-posix -I. -O3 -std=c11 -mfma -mf16c -mavx -mavx2 -c ggml.c -o ggml.o

x86_64-w64-mingw32-g++-posix -I. -I./examples -O3 -std=c++11 -lwinpthread -c whisper.cpp -o whisper.o

x86_64-w64-mingw32-g++-posix -I. -I./examples -O3 -std=c++11 -static-libgcc -static-libstdc++ -lwinpthread examples/main/main.cpp ggml.o whisper.o -o main

the compiled executable was tested on an Intel 4th gen CPU and it workedBUT accented characters do not show correctly (not a problem for english). A workaround (the problem might be with MinGW): before using main.exe on a command prompt window, execute the commandchcp 65001 (UTF-8 encoding).

Tried to run it on a 3rd gen intel CPU but did not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp