OpenQNX :: The QNX Community Portal

May 13, 2008 - 12:45 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 63 unlogged users and 2 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Lbdgwgt
Post subject: Debugging application with shared library  PostPosted: Feb 07, 2008 - 03:10 PM
Active Member


Joined: Jan 26, 2008
Posts: 11

Hi all.

i am new with QNX and Momentics IDE, i have a problem as i want to debug an application using a shares library.

I created the shared library, compiled it without error.

Then i created the application, added the library (and library path was also added automatically as i added the library) to the linker option of the application, compiled the application without any error.

But then as i try to debug the application, it says:

Code:
Could not find library libxxx_g.so.1


I looked inside the shared library projects directory, and it seems that only the "libxxx_g.so" is generated.

Am i missing something here?
FYI, i am using Momentics IDE 4.0.1 on Windows XP.

thanks for the answer.

regards,
 
 View user's profile Send private message  
Reply with quote Back to top
rgallen
Post subject: Re: Debugging application with shared library  PostPosted: Feb 07, 2008 - 04:33 PM
QNX Master


Joined: Jul 11, 2002
Posts: 557

Lbdgwgt wrote:
Hi all.

i am new with QNX and Momentics IDE, i have a problem as i want to debug an application using a shares library.

I created the shared library, compiled it without error.

Then i created the application, added the library (and library path was also added automatically as i added the library) to the linker option of the application, compiled the application without any error.

But then as i try to debug the application, it says:

Code:
Could not find library libxxx_g.so.1


I looked inside the shared library projects directory, and it seems that only the "libxxx_g.so" is generated.

Am i missing something here?
FYI, i am using Momentics IDE 4.0.1 on Windows XP.

thanks for the answer.

regards,


On the Debug Dialog there is a tab named "Download". On the pane for that tab there is a region named "Extra Libraries" with a check box titled "Do not download libraries to target". You need to uncheck that checkbox, then add the shared library you want to debug (clicking the "auto" button should fill this in automatically for you).

Also, on the source tab (in the Debug Dialog) you need to make sure that the source code that makes up your library is on the path (it should have been automatically added already, but just make sure).

When you do this, the IDE will take care of setting the LD_LIBRARY_PATH for you so that it picks up your library, so this should do it for you.

Also, depending on how adventurous you are, you may want to download the TAU alpha of the IDE, along with the gcc 4.2 preview (this is what I am currently using).
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
cburgess
Post subject:   PostPosted: Feb 07, 2008 - 05:36 PM
QNX Master


Joined: Aug 31, 2004
Posts: 175
Location: Ottawa
For some reason shared libs are built as libblah.so, but installed as libblah.so.1

So you don't get that until you do a make install

caution - this will attempt to install to $QNX_TARGET unless you have setup a staging area.

See http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource for a description of how to do that.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.