"kiran" <[EMAIL PROTECTED]> writes: > According to docs, there are 2 steps: > 1> the object files must be compiled using -fpic > 2> Shared library is created using -shared -fpic
Correct. > Now my doubt is, > even if I do not use -fpic option of the first step above, it still > works (on linux and solaris)!!! It *happens* to work, but you are programming by coincidence: http://www.awprofessional.com/articles/article.asp?p=31538&rl=1 It will also likely *not* work on Solaris/SPARC (you probably only tested on Solaris/x86). > So is -fpic really required in the first step above??? Yes. Otherwise, your shared library may fail to link (SPARC), or its pages will not be really shared between processes (Linux). > on Xeon(Sun-fire V65X) machine, when I use -fpic in the first step > above, application crashes for "throw" statement. Look for a bug elsewhere. What is the crash stack trace? > And if I do not use -fpic in first step, application does not crash! Probably coincidence. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus