LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-16-2006, 11:10 AM   #1
yola77
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
Unhappy kdevelop3 glibc error when linking to shared libraries


Hello,

I have a problem with kdevelop and shared libraries (and I have read other postings). I have Ubuntu-6.01 with kdevelop 3.3.2.

I am trying to integrate Geant4.8.1 in an IDE so I can debug. I have a working version of kdevelop3. Using a C++ simple hello world template I am attempting to add required '.so' libraries.

I have followed the official kdevelop3 FAQ and have spent many hours on-line for the answer, but no joy. I added the libraries to my makefile.am by hand i.e.for libdummie.so I added -ldummie to LD_FLAGS.

Anyways, this appears when executing in Kdevelop (in debug mode):

./test: error while loading shared libraries: libG4bosons.so: cannot open shared object file: No such file or directory

Even though I have added LD_LIBRARY_PATH to my Project->Project Options-> Configure Options with the appropriate path to the libraries. If I export the LD_LIBRARY_PATH to a bash shell and run my kdevelopProject-test/src/debug/test executable i get something else:

Hello, world!
*** glibc detected *** double free or corruption (!prev): 0x0804e0d8 ***
Aborted

As you can see it almost works but it appears that there could be a problem with Kdevelop. Have I missed something? How do I fix it?

Please help!

Thank you.
 
Old 08-16-2006, 12:44 PM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
you shouldnt have to edit the make files by hand. you either can add the libs through the project options in the configure panel (or is it the make panel?) or you can add them in the automake manager.

Quote:
./test: error while loading shared libraries: libG4bosons.so: cannot open shared object file: No such file or directory
that runtime linking error does not sound like a problem with kdevelop. try to export the LD_LIB*_PATH in a seperate console window and try to run the executable and see what happens.
 
Old 08-22-2006, 10:15 AM   #3
yola77
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Original Poster
Rep: Reputation: 0
I needed to add over a hundred shared libraries. I used

ls s >libs.list

and removed the extensions lib and .so and copied it to the relevant place in the makefile.am. There was no problem with this...

I added the path and got a "hello world!" message in a *seperate* shell and I agree that the error probably doesn't lie with kdevelop. I am not running geant4 with the recommended compilers so I guess it serves me right. I could use gcc-4.1.1 (a verified configuration) but ubuntu supplies version gcc-4.0.3...I cant seem to find a repository version. Is it risky to build a new gcc for kdevelop???

Thanks for any help.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to Shared Libraries with g++ random0 Programming 1 06-15-2006 10:12 PM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 07:47 AM
Shared libraries and linking., devin Programming 3 04-08-2003 03:18 PM
Linking to shared libraries? Griffon26 Programming 1 10-20-2001 05:29 PM
linking with shared libraries kobilevi Programming 0 03-01-2001 10:09 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:38 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