Creating static libraries
问题 I'm trying to create a static library to use inside my PHP extension. To do that, I'm compiling my .c files using gcc -c file.c -o file.o and obtaining .o files. I then use ar rcs lib.a *.o to archive all the compiled objects into an .a file. After doing this, I'm referring to this .a file when compiling my PHP extension, but I get the following error: *** Warning: Linking the shared library <extension>.la against the *** static library lib.a is not portable! If I use the .o files instead of