Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <001a01bf0492$d046cb20$c0019c95@SciFi.PL> From: "Maciek Dobrzanski" To: Subject: Loadable modules Date: Wed, 22 Sep 1999 02:35:29 +0200 Organization: SciFi.PL - Fantastyka w internecie MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2417.2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Hi, I have written simple program that imports functions from external modules (using dlopen() and dlsyms()). Also I have written simple module with one function inside that does nothing but printing "It worked". Now, I don't now how to compile/link/whatever the module, so that it could be loaded into the program. gcc -o test.exe test.c gcc -c -o mod.o mod.c and then what...??? Executing 'ld -o mod.so mod.o' doesn't work (there is an error because of undefinied reference to printf()). program.c: ... ptr = dlopen ("mod.so", 1); ... test = (func) dlsym (ptr, "mod_exec"); test(); ... mod.c: #include int mod_exec () { printf ("It worked!\n"); } -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com