c++ - In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status -
i'm new g++ , compiling c++ code in linux. i'm trying connect several .o files .lib using g++.
this command used "g++ -o ../fuzzy/fuzzy.lib example1.o example2.o" , got error. though try connect single object file , make .lib, doesn't work.
your appreciated.
thanks
to make static library, use ar
:
ar rcs mylibrary.a a.o b.o c.o
to make shared library, use gcc
link:
gcc -o mylibrary.so -shared a.o b.o. c.o
Comments
Post a Comment