Why am I getting this err开发者_JAVA技巧or while linking a shared object file?
$ gcc calcicall.c -o dynamically_linked -L. libcalcimethods.so.1.0.1
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../libcygwin.a(libcmain.o):(.text+0xa9)
undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
Can someone help me? Thanks
undefined reference to `_WinMain@16'
You are compiling and linking it as an executable.
Use -shared
to compile and link it as Shared object or otherwise define main function in your program.
精彩评论