Operating System - HP-UX
1753798 Members
7439 Online
108805 Solutions
New Discussion юеВ

how to know the compiler/link options used on a library ?

 
Laurent Laperrousaz
Regular Advisor

how to know the compiler/link options used on a library ?

I want to identify which options where used to compile or link a module (static or dynamic).
Are there some information available in the library headers?
2 REPLIES 2
Victor BERRIDGE
Honored Contributor

Re: how to know the compiler/link options used on a library ?

Hi Laurent,

All I can think of at present is to use ldd...


All the best
Victor
Laurent Laperrousaz
Regular Advisor

Re: how to know the compiler/link options used on a library ?

ldd does not provide such information.

I wrote a small script based on 'strings'

here it is:
strings $1|grep -E 'options|\.cxx'

I added .cxx to get the name of the c++ sources which are named myName.cxx in our applications.

This provides all compilation options for all sources complied in the lib. But it gives too much information

Maybe I can get clearer infirmation adding sed or awk commands?