开发者

Getting an error while linking a .so file with the NDK

开发者 https://www.devze.com 2023-03-15 06:57 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消