0

-mno-cygwin compiler parameter doesn't exist.

I tried to use '-static', but then compiler can't find installed -lpng

user64675
  • 482
  • 7
  • 25

1 Answers1

2

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.

Reference Executable file generated using GCC under cygwin

Community
  • 1
  • 1
swda289346
  • 21
  • 1