How to statically link missing libgcc_s_seh-1.dll and libstdc++-6.dll DLLs for 9.3-win32 MinGW executable
11
votes
1
answer
10190
views
I want to compile a simple Windows application on Linux using MinGW.
I compile as follows:
x86_64-w64-mingw32-g++ -L. -l:mathlib.dll -o fib main.cpp mathlib.h
This results in an executable
fib
that computes the N'th fibonacci number using a function imported from mathlib.dll
.
Now, when executing fib
on Windows, it complains that libgcc_s_seh-1.dll
and libstdc++-6.dll
are missing.
If I copy these DLLs to Windows, then everything works, but I'd like not to copy these MinGW dependencies with every executable.
How can I statically link these MinGW depencies, such that foo
depends on no other DLLs than mathlib.dll
?
Asked by Shuzheng
(4931 rep)
Feb 8, 2021, 01:10 PM
Last activity: Jan 17, 2024, 07:27 AM
Last activity: Jan 17, 2024, 07:27 AM