Undefined reference to WinMain in Cygwin

前端 未结 1 1869
面向向阳花
面向向阳花 2020-12-06 17:42

I am trying to compile and having following problem

$ gcc errlib.c -o errlib.o

/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib/libcygwin.a(libcmain.o):          


        
相关标签:
1条回答
  • 2020-12-06 18:24

    Use -c compile flag to only produce object file. Without -c it tries to link an executable and the linker (called automatically) fails.

    0 讨论(0)
提交回复
热议问题