Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-18-2006, 10:50 AM   #1
Registered: Sep 2003
Posts: 54

Rep: Reputation: 15
possibly a dynamic linking issue (xerces libraries)

Hello all,

I am out of college and new to developing on the linux platform, and need help with the problems that occur in my environment. Case in point...

I am making a file converter on Fedora Core 2 in c++ that changes a company proprietary format to xml, and part of this process uses xerces. I have built the package from source, and set the XERCESCROOT enviroment variable, included the $XERCESCROOT/bin folder to the PATH, and the $XERCESCROOT/lib path to LD_LIBRARY_PATH. These are perscribed by the build and install instructions.

I have added the $XERCESCROOT/includes path to the Qt *.pro file (yes, we are using Qt 4.1.4) as an additional include path (Is there an enviroment variable for all include directories?). I also added "-lxerces-c -L${XERCESCROOT}/lib" to the LIBS variable in the makefile.

The problem occurs when I try to launch my application. "/workspace/parser/parser: error while loading shared libraries: cannot open shared object file: No such file or directory" The file exists.

I wish I knew more about how the application is trying to link to the *.so file. I think there is a command to look at that information, ldconfig I think, but I don't know how to use it or if it is the correct command. I searched the archives but found nothing that helps me learn about the process and how to track this down.

An explaination or some help in tracking this down would be appreciated.
Old 09-18-2006, 11:15 AM   #2
Registered: Sep 2003
Posts: 54

Original Poster
Rep: Reputation: 15
I found the problem.

It turns out it is a reoccuring problem that has plagued me since I started working on this machine. No matter how many times I set the LD_LIBRARY_PATH variable to include additional values, IT NEVER FRIGGIN STICKS. I have enviroment variables set in my .bash_profile, and they all work just fine, but LD_LIBRARY_PATH has to spite me.

I'll figure that one out one day, or format my system in a fit of rage trying...
Old 09-18-2006, 04:31 PM   #3
Registered: Sep 2003
Posts: 54

Original Poster
Rep: Reputation: 15
And I figured out why setting LD_LIBRARY_PATH never stayed. I was modifying enviroment variables in .bash_profile. Aparently, this is a bad place to do so. A better place would be in .bashrc, where LD_LIBRARY_PATH was being declared in the first place. I moved my declarations over and resolved my issues.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking old libraries to new one? winterhunter Linux - Software 7 10-24-2005 05:37 AM
dynamic linking joshknape Linux - Software 1 09-19-2005 10:43 PM
dynamic linking and g++ kris273 Programming 10 08-16-2004 03:16 PM
a simple dynamic linking program kris273 Programming 3 04-18-2004 07:26 AM
Static/dynamic linking ugenn Linux - Software 0 12-16-2002 12:01 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:02 AM.

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