delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comSEND DOT SPAM> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: library |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <inoqbscql0oo48gc1hbsv8uihnnf1d9orr@4ax.com> |
References: | <89jkdv$oef$1 AT pegasus DOT tiscalinet DOT it> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 40 |
X-Trace: | +r2abgCD8cbXgMZGjLzBMy+OBEtaM0mYCncA+qMF6ON1Nc9Ce8hjld8HnFPdSUO1R0eopuE1tafk!B2r4gzJDdizpciAn8GS+hXZFVACdgFFUiL6Eyyk9tkrg3stkMWJbXgx0gxWrkZ1AKqSd8ri8qksQ!35M= |
X-Complaints-To: | abuse AT gte DOT net |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
NNTP-Posting-Date: | Wed, 01 Mar 2000 18:39:00 GMT |
Distribution: | world |
Date: | Wed, 01 Mar 2000 18:39:00 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Wed, 1 Mar 2000 18:23:19 +0100, "abacuc" <f DOT onorati AT tiscalinet DOT it> wrote: >I would like to know how can I create a library. >For example: >I've written a file.c like this: > >int function1(int a) >{....} >int function2(int b) >{....} > >and i call it "library.c". >I create a file "library.h" like this: > >#ifndef __include_library_h_ >#define__include_library_h_ >int function1(int a); >int function2(int b); >#endif > >Now I want how can i create a library.a file (I putting in >c:\djgpp\lib folder while library.h in include folder)....so i can include >it in my file like: >#include<library.h> First, compile your library.c into a .o file. C:\MYLIB>gcc -c library.c Then, read up on how to use the 'ar' command. C:\MYLIB>info ar Or just look at the Allegro makefile. -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your .sig to prevent the spread of .sig viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |