How to check out the contents of a .so file in Solaris?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > How to check out the contents of a .so file in Solaris?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to check out the contents of a .so file in Solaris?  
linq936@hotmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-07 12:18 AM

Hi,
I am writing software on saloris and in linking the final
executable, I get error saying "Undefined first referenced" and they
are all from one .so file.

The structure is like this:

1.c ==compiled into ==> 1.so ==built into==> 2.so

The error message is saying symbols declared and defined in 1.c are
not defined.

So is there a way to check the contents of 2.so to see if 1.so is in
it? And further if those symbols are in 2.so?

Thanks!






[ Post a follow-up to this message ]



    Re: How to check out the contents of a .so file in Solaris?  
Ian Collins


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-07 06:18 AM

linq936@hotmail.com wrote:
> Hi,
>   I am writing software on saloris and in linking the final
> executable, I get error saying "Undefined first referenced" and they
> are all from one .so file.
>
How are you building and how are you linking?

--
Ian Collins.





[ Post a follow-up to this message ]



    Re: How to check out the contents of a .so file in Solaris?  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-07 06:18 AM

linq936@hotmail.com writes:

>   1.c ==compiled into ==> 1.so ==built into==> 2.so

You can't build 1.so into 2.so on any UNIX system except AIX (and
even then only with some hacks).

On most other UNIXes (including Solaris) the .so file is "fully
prepared"; you can't build it into anything, you can only use it.

>   The error message is saying symbols declared and defined in 1.c are
> not defined.

Probably because they aren't.

> So is there a way to check the contents of 2.so

You can see which symbols it defines with 'nm'.

> to see if 1.so is in it?

I can tell you right away -- it isn't.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Re: How to check out the contents of a .so file in Solaris?  
linq936@hotmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-07 06:23 PM

On May 17, 7:31 pm, Paul Pluzhnikov <ppluzhnikov-...@charter.net>
wrote:
> linq...@hotmail.com writes: 
>
> You can't build 1.so into 2.so on any UNIX system except AIX (and
> even then only with some hacks).
>
> On most other UNIXes (including Solaris) the .so file is "fully
> prepared"; you can't build it into anything, you can only use it.
> 
>
> Probably because they aren't.
> 
>
> You can see which symbols it defines with 'nm'.
> 
>
> I can tell you right away -- it isn't.
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.

Yes, you are right. I checked again, it is like this:

1.h declares function
1.c == compiled into ==> 1.so
2.c includes 1.h and calls functions defined in 1.c and 2.c is
compiled into 2.so.

Now in linking the final executable, I get "Undefined first
referenced" from 2.so and the errors are all from 1.c. I checked the
command line, 1.so is not there. This explains it.

Thanks a lot.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:38 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register