[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem in linking using g++.
From: |
Amit Bhatia |
Subject: |
Problem in linking using g++. |
Date: |
18 Aug 2005 14:01:06 -0700 |
User-agent: |
G2/0.2 |
Hi,
I am using gcc version 3.3 on os X 10.3.9
I am trying to create a library written in c++. First I get the object
files *.o
Then I use the following,
ar ruv libmy.a file1.o file2.o file3.o file4.o
Now I try to use it in a test file, using,
g++ -pg -O -Wno-deprecated -ansi -pedantic -o test test.C
-DANSI_HEADERS -D_G_HAVE_BOOL -I. -I/ALLTHEINCLUDEDIRS -lmy -L.
And I get the following error message:
ld: archive: ./librat.a has no table of contents, add one with
ranlib(1) (can't load from it)
I have created library using the same method before on gcc 3.1, on RH
9.0 and never had problems. Is there something changed?
How can I resolve this problem?
thanks,
amit.
- Problem in linking using g++.,
Amit Bhatia <=