delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/01/22:14:35

From: "abacuc" <f DOT onorati AT tiscalinet DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: library
Date: Wed, 1 Mar 2000 22:07:48 +0100
Organization: Tiscali Spa
Lines: 48
Message-ID: <89k1fi$1ic$1@pegasus.tiscalinet.it>
References: <89jkdv$oef$1 AT pegasus DOT tiscalinet DOT it> <inoqbscql0oo48gc1hbsv8uihnnf1d9orr AT 4ax DOT com>
NNTP-Posting-Host: rm4-637.tiscalinet.it
X-Trace: pegasus.tiscalinet.it 951945522 1612 62.11.134.61 (1 Mar 2000 21:18:42 GMT)
X-Complaints-To: newsadmin AT tiscali DOT it
NNTP-Posting-Date: 1 Mar 2000 21:18:42 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Damian Yerrick" <DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comSEND DOT SPAM> ha scritto
nel messaggio news:inoqbscql0oo48gc1hbsv8uihnnf1d9orr AT 4ax 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/

but if I type ar -p library.o it says error in file's format


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019