From owner-freebsd-questions Wed Nov 24 5: 1:30 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailhub2.stratus.com (mailhub.stratus.com [134.111.1.16]) by hub.freebsd.org (Postfix) with ESMTP id 57B07150D8 for ; Wed, 24 Nov 1999 05:01:26 -0800 (PST) (envelope-from Pradesh_Chanderpaul@stratus.com) Received: from exna1.stratus.com (exna1.stratus.com [134.111.200.65]) by mailhub2.stratus.com (8.9.3/8.9.3) with ESMTP id HAA06531 for ; Wed, 24 Nov 1999 07:57:21 -0500 (EST) Received: by exna1.stratus.com with Internet Mail Service (5.5.2448.0) id ; Wed, 24 Nov 1999 08:01:46 -0500 Message-ID: <1D1A4EF7AD4DD211A80D00A0C9D7DB6604547276@exna1.stratus.com> From: "Chanderpaul, Pradesh" To: "'freebsd-questions@FreeBSD.ORG'" Subject: WANTED : Idiot's guide to dynamic loading in FreeBSD Date: Wed, 24 Nov 1999 08:01:45 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Could someone please provide guidance with this topic. You can help by filling in the blanks. I have searched the mailing lists man pages and the net at large without getting a satisfactory understanding. Consider the following scenario. I need to compile a program consisting of two source files. main.c --> contains --> int main(int argc, char **argv) misc.c --> contains --> int funcA(arg1, arg2, ... ) main() does not know in advance that it has to invoke funcA. It uses dlopen()/dlsym() to obtain references and invoke funcA. The two source files will be linked into a single executable. I am using GCC running on FreeBSD 3.1-RELEASE. Q1 : What flags are required to compile the individual source files? Q2 : What flags are required to link the object files into the single executable? Q3 : Is there anything else I should be wary of? Thanking you in advance. =============================================================== Pradesh Chanderpaul Phone: +27 12 663 3260/6 Stratus Computer Systems FAX : +27 12 663 3281 South Africa CAC Email: Pradesh_Chanderpaul@stratus.com =============================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message