[omniORB] /echo/eg1 runs segmentation fault when linked with static library

Duncan Grisby duncan at grisby.org
Wed Jan 3 16:36:04 GMT 2007


On Thursday 7 December, "jack dang" wrote:

> in the example directory omniORB-4.0.7/build/src/examples/echo, I simply
> 
> #      make
> #      rm -f eg1
> #      g++ -g -o eg1 -O2 -Wall -Wno-unused -fexceptions -fno-unit-at-a-time
> -L../../../lib -L../../../../lib eg1.o ../../../stub/echoSK.o
> /home/jack/omniORB-4.0.7/build/lib/libomniORB4.a
> /home/jack/omniORB-4.0.7/build/lib/libomnithread.a
> -lpthread
> #      ./eg1
> Segmentation fault

It works for me. However, that's not the normal way to statically link
things. Does it work if you use -static like this:

g++ -g -o eg1 -O2 -Wall -Wno-unused -fexceptions -fno-unit-at-a-time
-L../../../lib -L../../../../lib eg1.o ../../../stub/echoSK.o
-static -lomniORB4 -lomnithread -lpthread

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list