2

I was reading Intel Inspector XE 2013 documentation, and they have mentioned setting of flag "-Bdynamic". Can anyone please tell me what does this flag do ? I have searched the gnu compilation options but have not seen this.

Thanks, Sheeri

Monku
  • 2,440
  • 4
  • 33
  • 57
  • 2
    To dynamically link the libraries. – Dayal rai Jan 16 '14 at 06:29
  • 1
    What did you searched, exactly? The [first result from google](https://www.google.it/search?espv=210&es_sm=91&q=Bdynamic&oq=Bdynamic&gs_l=serp.3..0i7i10i30i19j0i7i30i19l9.5082.5082.0.5467.1.1.0.0.0.0.195.195.0j1.1.0....0...1c.1.32.serp..0.1.194.eSH0WKIojfM) explains it. – Shoe Jan 16 '14 at 06:31
  • I searched for "-Bdynamic" compilation flag but google did not answer correct results. I guess my search query syntax was misleading. – Monku Jan 16 '14 at 07:45
  • since your qeury term `"-Bdynamic` starts with a dash `-` google **excluded** it from results - https://support.google.com/websearch/answer/136861?hl=en – Glenn Teitelbaum Jan 16 '14 at 08:02
  • @Jefffrey your link cleverly omits the dash without explaining the need to do that - not everyone is as clever as you – Glenn Teitelbaum Jan 16 '14 at 08:05
  • just a thought--wouldnt keeping the search tag within quotes facilitate the whole string search ?? – Monku Jan 16 '14 at 11:00

1 Answers1

12

assume you have both a shared library: libabc.so and a static library: libabc.a in the same directory referenced by -L and using -labc to specify the library:

with -Bdynamic it will use libabc.so

with -Bstatic it will use libabc.a

Glenn Teitelbaum
  • 10,108
  • 3
  • 36
  • 80