Click here to Skip to main content
15,886,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWant to learn Pin
Learning CPP language28-May-09 11:51
Learning CPP language28-May-09 11:51 
GeneralRe: Want to learn Pin
David Crow28-May-09 16:30
David Crow28-May-09 16:30 
Questionbind() to specific network interface before connect() Pin
Alexander M.,28-May-09 10:37
Alexander M.,28-May-09 10:37 
AnswerRe: bind() to specific network interface before connect() Pin
Stuart Dootson28-May-09 11:09
professionalStuart Dootson28-May-09 11:09 
GeneralRe: bind() to specific network interface before connect() Pin
Alexander M.,28-May-09 12:45
Alexander M.,28-May-09 12:45 
GeneralRe: bind() to specific network interface before connect() Pin
Alexander M.,29-May-09 6:31
Alexander M.,29-May-09 6:31 
GeneralRe: bind() to specific network interface before connect() Pin
Stuart Dootson29-May-09 13:18
professionalStuart Dootson29-May-09 13:18 
QuestionStatic Library linking problem: Archive has no index; run ranlib to add one Pin
thelonesquirrely28-May-09 8:26
thelonesquirrely28-May-09 8:26 
Heya,

So I am trying to work on a make environment that will let me create two libraries and then link against them.

The procedure goes like this:
1. create obj files for lib1 (about a dozen files):
*** Compiling .obj/common.o ...
g++ -O3 -MMD -pipe -pthread -D_REENTRANT -DICL_MEM_DEFAULT_DIRECT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DBASE_THREADSAFE -march=native -Wall -Wno-write-strings -Wpointer-arith -Wno-ctor-dtor-privacy -Wmultichar -Wdisabled-optimization -Woverloaded-virtual -Wclobbered -Wempty-body -Wsign-compare -Wtype-limits -Wno-unused -Wuninitialized -I./proto -I/tmp/protobuf-2.1.0/include -I/tmp/protobuf-2.1.0/include/google/protobuf -I/tmp/protobuf-2.1.0/include/google/protobuf/io -c proto/common.pb.cc -o .obj/common.o


2. group the object files together into archive
ar rcs lib/libxproto.a ./.obj/cs_enums.o ./.obj/common.o ./.obj/converged_common.o ...<obj list="">

3. repeat for the second lib.
4. compile a few other objs for MY program:
*** Compiling ../BuildSupport/ExternalLinks/utilities/src/Thread.C ...
g++ -O3 -MMD -pipe -pthread -D_REENTRANT -DICL_MEM_DEFAULT_DIRECT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DBASE_THREADSAFE -march=native -Wall -Wno-write-strings -Wpointer-arith -Wno-ctor-dtor-privacy -Wmultichar -Wdisabled-optimization -Woverloaded-virtual -Wclobbered -Wempty-body -Wsign-compare -Wtype-limits -Wno-unused -Wuninitialized -I./include -I../BuildSupport/ExternalLinks/utilities/include -I./proto -I/tmp/protobuf-2.1.0/include -I/tmp/protobuf-2.1.0/include/google/protobuf -I/tmp/protobuf-2.1.0/include/google/protobuf/io -I/tmp/OpenAMQ-1.4b3/ibase/include -I../BuildSupport/ExternalLinks/boost/include/boost-1_39 -I../BuildSupport/ExternalLinks/utilities/include -I../CaddyShack_Common/amq/include -I../CaddyShack_Common/id/include -c ../BuildSupport/ExternalLinks/utilities/src/Thread.C -o .obj/Thread.o


5. the final step is to compile the objs into an executable, link against the libs:
g++ -static -O3 -MMD -pipe -pthread -D_REENTRANT -DICL_MEM_DEFAULT_DIRECT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DBASE_THREADSAFE -march=native -Wall -Wno-write-strings -Wpointer-arith -Wno-ctor-dtor-privacy -Wmultichar -Wdisabled-optimization -Woverloaded-virtual -Wclobbered -Wempty-body -Wsign-compare -Wtype-limits -Wno-unused -Wuninitialized -L./lib -lxamq -lxproto <obj list=""> -o ../bin/circuit_accelerator

I get the following error:
./lib/libxamq.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status


I tried using ranlib after it, and then just relinking still no good. I also am using the 's' flag when doing the ar, meaning i shouldn't have to do a ranlib.

any ideas on why i would be getting this error? Any ideas on how to resolve it? Thanks in advance!!!
AnswerRe: Static Library linking problem: Archive has no index; run ranlib to add one Pin
Single Step Debugger28-May-09 10:03
Single Step Debugger28-May-09 10:03 
AnswerRe: Static Library linking problem: Archive has no index; run ranlib to add one Pin
Stuart Dootson28-May-09 11:06
professionalStuart Dootson28-May-09 11:06 
GeneralRe: Static Library linking problem: Archive has no index; run ranlib to add one Pin
thelonesquirrely28-May-09 14:06
thelonesquirrely28-May-09 14:06 
GeneralRe: Static Library linking problem: Archive has no index; run ranlib to add one Pin
Stuart Dootson28-May-09 14:47
professionalStuart Dootson28-May-09 14:47 
QuestionRead an IGES (Initial Graphics Exchange Specification) File uaing C++ Pin
raesa28-May-09 2:55
raesa28-May-09 2:55 
AnswerRe: Read an IGES (Initial Graphics Exchange Specification) File uaing C++ Pin
led mike28-May-09 4:33
led mike28-May-09 4:33 
GeneralRe: Read an IGES (Initial Graphics Exchange Specification) File uaing C++ Pin
raesa28-May-09 18:27
raesa28-May-09 18:27 
AnswerRe: Read an IGES (Initial Graphics Exchange Specification) File uaing C++ Pin
Stuart Dootson28-May-09 8:01
professionalStuart Dootson28-May-09 8:01 
AnswerRe: Read an IGES (Initial Graphics Exchange Specification) File uaing C++ Pin
Maximilien28-May-09 11:09
Maximilien28-May-09 11:09 
QuestionTaget operating system Pin
Gagnon Claude28-May-09 2:14
Gagnon Claude28-May-09 2:14 
AnswerRe: Taget operating system Pin
Rajesh R Subramanian28-May-09 2:17
professionalRajesh R Subramanian28-May-09 2:17 
AnswerRe: Taget operating system Pin
Single Step Debugger28-May-09 4:33
Single Step Debugger28-May-09 4:33 
QuestionBuild Application in VC++ Pin
anassamar28-May-09 2:06
anassamar28-May-09 2:06 
AnswerRe: Build Application in VC++ Pin
Chandrasekharan P28-May-09 2:11
Chandrasekharan P28-May-09 2:11 
GeneralRe: Build Application in VC++ Pin
anassamar28-May-09 3:58
anassamar28-May-09 3:58 
AnswerRe: Build Application in VC++ Pin
Naveen28-May-09 2:11
Naveen28-May-09 2:11 
AnswerRe: Build Application in VC++ Pin
Rajesh R Subramanian28-May-09 2:12
professionalRajesh R Subramanian28-May-09 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.