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
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.
What does a pointer variable always consist of?
Is struct oop?
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.
Do you know the use of fflush() function?
What is the role of this pointer?
Write a program to swap two numbers without using a temporary variable?
#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??
What is the explanation for cyclic nature of data types in c?
How many types of arrays are there in c?
Explain how can you determine the size of an allocated portion of memory?
What is a memory leak? How to avoid it?
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.
Is it better to use malloc() or calloc()?
List the difference between a "copy constructor" and a "assignment operator"?