-mno-cygwin compiler parameter doesn't exist.
I tried to use '-static', but then compiler can't find installed -lpng
-mno-cygwin compiler parameter doesn't exist.
I tried to use '-static', but then compiler can't find installed -lpng
You need to cross compile it. Run x86_64-w64-mingw32-gcc
, included in package mingw64-x86_64-gcc-g++
, in cygwin64 to cross compile a native windows 64bit executable. It is similar if you are in cygwin or to compile a 32bit executable.
However, without cygwin compatibility layer, a program using POSIX APIs cannot be compiled. If your program needs POSIX APIs, you have to compile with cygwin dependency.