g++ / CC on Solaris

From: Thierry Auger (auger@jlab.org)
Date: Fri Jun 19 1998 - 16:17:52 MEST


hello everybody,
I am trying to produce a small shared library for root. 
When I compile the code and the dictionnary with g++ and link with CC:
g++ -O -I/work1/analyse/root/include -fPIC  -I.   -c complex.cc
g++ -O -I/work1/analyse/root/include -fPIC  -I.   -c complexCint.cc
CC -g -G *.o -o libpp.so

root doesn't recognize the new compiled classes. When I use CC instead of g++
that works perfectly.
CC -O -KPIC -I/work1/analyse/root/include -DSunOS  -I.   -c complex.cc
CC -O -KPIC -I/work1/analyse/root/include -DSunOS  -I.   -c complexCint.cc
CC -g -G *.o -o libpp.so

Now I have some g++ specific codes (using
the const cast operator) that I want to add, so I still want to use g++. Am I
giving the wrong options, or do I have to use one compiler through all the
steps? I also tried to use g++ to produce the shared library instead but it
don't know why it doesn't work, it gives a a.out file.
g++ -g -Wl,-soname,libpp.so -shared -msparc *.o 

sincerely,
Thierry Auger.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:34 MET