g++/ld library problem I think
I have a make file right now that is doing all my compiling and linking for all my CORBA files. I am able to compile and link my files for my CORBA server but when I run the "executable" I get a error:
./myserver: error while loading shared libraries: libomnithread.so.3: cannot open shared object file: No such file or directory Now I link the libraries in when I created myserver, so from what I am reading on the internet I need to somehow add all these libraries for OmniORB to my PATH, how do I go about doing that? for a FYI my make file is below: CC = g++ CPPFLAGS = -c LDFLAGS = -c OMNI_HOME = /accts/jgmillag/Desktop/OmniORB/lib FILE_HOME = -I/accts/jgmillag/Desktop/HMI_WIS_IDE/CPP_CORBA OMNI_INCLUDES = -I$(OMNI_HOME)/include/ OMNI_LIB_DIR = $(OMNI_HOME)/lib OMNIIDL = $(OMNI_HOME)/bin/omniidl INCLUDES = $(FILE_HOME)/CORBA LIBS = -L$(OMNI_HOME) -lomnithread -lomniDynamic4 -lomniORB4 OBJECTS = RSSK.o CFSK.o HMI_ServiceSK.o server.o CORBA_IDL = RSSK CFSK HMI_serviceSK all Server: $(CORBA_IDL) $(OBJECTS) $(CC) -o myserver $(FILE HOME) $(OBJECTS) $(LIBPATH) $(LIBS) RSSK: RS.idl omniidl -bcxx RS.idl CFSK: CF.idl omniidl -bcxx CF.idl HMI_serviceSK: HMI_Service.idl omniidl -bcxx HMI_Service.idl HMI_ServiceSK.o: HMI_ServiceSK.cc HMI_Service.hh $(CC) $(CPPFLAGS) $(INCLUDES) HMI_ServiceSK.cc server.o: server.cpp HMI_Service.hh $(CC) $(CPPFLAGS) $(INCLUDES) server.cpp RSSK.o: RSSK.cc RS.hh $(CC) $(CPPFLAGS) $(INCLUDES) RSSK.cc CFSK.o: CFSK.cc CF.hh $(CC) $(CPPFLAGS) $(INCLUDES) CFSK.cc |
Is $(OMNI_HOME)/lib part of /etc/ld.so.conf ?
Also, is there actually an $(OMNI_HOME)/lib/lib ? Cheers, Tink |
Thanks for the replay, no it was not apart of /etc/ld.so.conf, I added it to it, but that didn't seem to fix the problem, my ld.so.conf is below:
include ld.so.conf.d/*.conf /usr/ofed/lib /accts/jgmillag/Desktop/OmniORB/lib does that look right? I see what you are referring to with the /lib/lib and no that doesn't exist, I am not using that OMNI_LIB_DIR so I suppose I didn't notice, thanks. |
That looks fine ...
After editing ld.so.conf ... did you run ldconfig or restart the machine? Cheers, Tink |
No that didn't do the trick, i ended up creating a LD_LIBRARY_PATH variable and then setting it to my lib path and that fixed it. Thanks for the replies!
|
All times are GMT -5. The time now is 08:33 AM. |