Date: Fri, 1 Mar 1996 01:44:26 +0800 (GMT+0800) From: "Humprey C. Sy" <humprey@linux1.dlsu.edu.ph> To: questions@freebsd.org Subject: Compiling with shared libraries Message-ID: <Pine.LNX.3.91.960301013748.19707A-100000@ccslinux.dlsu.edu.ph>
next in thread | raw e-mail | index | archive | help
I'm confused about how shared libraries actually work. Here's my problem: I was able to make a shared library file - libmac.a. What I'm confused about is how come if I have to compile it together with my c program, I have to place the option "-lmac" at the end of the command. i.e. cc -O2 zo.c -lmac If I try to include "-lmac" before zo.c, the procedures compiled in libmac.a won't be seen at all, and the compiler returns errors saying these procedures are unreferenced from text segment. Why is this so? Any clarifications would be greatly appreciated. Thank you very much! - Humprey -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.91.960301013748.19707A-100000>