LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-31-2007, 03:18 PM   #1
joelcomp1
LQ Newbie
 
Registered: Mar 2004
Distribution: Ubuntu 7.04/ Fedora Core 6
Posts: 19

Rep: Reputation: 0
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
 
Old 08-31-2007, 05:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Is $(OMNI_HOME)/lib part of /etc/ld.so.conf ?

Also, is there actually an $(OMNI_HOME)/lib/lib ?



Cheers,
Tink
 
Old 09-04-2007, 08:14 AM   #3
joelcomp1
LQ Newbie
 
Registered: Mar 2004
Distribution: Ubuntu 7.04/ Fedora Core 6
Posts: 19

Original Poster
Rep: Reputation: 0
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.
 
Old 09-04-2007, 01:09 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That looks fine ...
After editing ld.so.conf ... did you run ldconfig or
restart the machine?


Cheers,
Tink
 
Old 09-05-2007, 08:08 AM   #5
joelcomp1
LQ Newbie
 
Registered: Mar 2004
Distribution: Ubuntu 7.04/ Fedora Core 6
Posts: 19

Original Poster
Rep: Reputation: 0
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LINUX - linking archive (static library) with shared (dynamic) library gurkama Programming 5 03-04-2007 11:11 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 09:18 PM
library problem Santas Linux - Software 3 06-29-2003 09:51 AM
Shared library problem (BIG problem) jlg Slackware 1 03-25-2003 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration