Saturday, January 22, 2011

g++: unrecognized option -R

I was stuck with the unrecognized option -R error in makefile of COOL language. I myself have never used it though.

I found the solution on a maililng list

The author suggests using -Wl or -rpath instead of -R . Refer to the above mailing list for more info.

This option is not portable.  It's actually a linker option, that GCC
accepts on a few targets for compatibility with the native compilers
of those platforms.  In general, you should use -Wl,-R to pass the
flag directly to the linker, if the linker supports it.  Sometimes
you'll find the spelling of the flag.  The GNU linker accepts both
-rpath and -R.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

1 comment: