Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

HOW CAN ADD OUR FUNCTION IN LIBRARY.

Answer Posted / ataraxic

Using ar utility.
Let's say we have lib1.c lib2.c and myprog.c
We want to do a library from lib1.c && lib2.c, and compile
myprog.c with this library afterwards.
The steps are:
Compile
1. gcc -c lib1.c -o lib1.o
2. gcc -c lib2.c -o lib2.o

Create archive named libmy.a
3. ar -rcsv libmy.a lib1.o lib2.o

Compile myprog with newly created lib
4. gcc myprog.c -L. -lmy -o myprog

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

2307


What does a pointer variable always consist of?

1098


Is struct oop?

1002


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1403


Do you know the use of fflush() function?

1059


What is the role of this pointer?

1070


Write a program to swap two numbers without using a temporary variable?

1122


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1951


What is the explanation for cyclic nature of data types in c?

1208


How many types of arrays are there in c?

1042


Explain how can you determine the size of an allocated portion of memory?

1106


What is a memory leak? How to avoid it?

1338


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1063


Is it better to use malloc() or calloc()?

1109


List the difference between a "copy constructor" and a "assignment operator"?

1011