0

I am trying to compile pynifti package from source (long story involving Anaconda Python distribution).

After running make, I receive the following error:

 gcc: error: unrecognized command line option ‘--Wl,--no-undefined’

Indeed, the manual (man gcc) contains no information about --no-undefined switch. My version of gcc is 4.8.5. Also, I can not find the no-undefined option in https://gcc.gnu.org/onlinedocs/gcc/Option-Index.html#Option-Index

However, from Force GCC to notify about undefined references in shared libraries I infer that it is a valid switch at least for some version of gcc.

Community
  • 1
  • 1
abukaj
  • 2,582
  • 1
  • 22
  • 45

1 Answers1

3

This switch is a linker option for ld. It is not directly part of GCC but it is only encapsulated in a -Wl option to be passed to the linker (you seem to have --Wl which is wrong).

Edit: Yugr deserves part of the credit as he pointed out the incorrect --Wl option!

Gerhardh
  • 11,688
  • 4
  • 17
  • 39