Error while linking lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Arvur · 2017-11-09 12:26 I'm trying to compile shared library under Mac OS X El Captain and receive Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (9015) Linking /Users/Administrator/Projects/Tokens/bin/libnpbssplugin.dylibld: illegal text-relocation to '_$NPPLUGIN$_Ld4' in /Users/Administrator/Projects/Tokens/dcu/i386-darwin/NPPlugin.o from '_NPPLUGIN_$$_HANDLENPNEXCEPTION$ANSISTRING$EXCEPTION' in /Users/Administrator/Projects/Tokens/dcu/i386-darwin/NPPlugin.o for architecture i386An error occurred while linking npBSSPlugin.dpr(192) Error: (9013) Error while linking  I've found similar problem here: Quotejust add other link flag: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i -read_only_relocs suppress But I don't see how to pass this flag to linker. Any solutions? Thanks! P.S. Lazarus 1.6.4, FPC 3.0.2 ---------------------------------------------------------------------- Eugene Loza · 2017-11-09 13:31 Quotehow to pass this flag to linkersee attached screenshoot. Project - Project Options - Custom Options - Custom Options field However QuoteError while linkingproblem may be also caused by recent Linux- related FPC 3.0.2 packaging bug. Try newer Lazarus&FPC version, e.g. 1.8RC5+FPC3.0.4. ---------------------------------------------------------------------- Arvur · 2017-11-10 08:15 I suppose linker param should be passed this way (see screenshot). But it says space is delimiter - so I cannot put flag to param. [SOLVED] The problem was in -Cg- option. Linker failed without PIC code. To look deeper: Option -Cg- was used to compile some asm-code (it produced error "PIC- safe..."). But Delphi XE6 compiled this code for Mac OS without error. So asm itself is Ok. Moreover! Lazarus compiled this code on Linux perfectly. Maybe I should make some short sample for bugtracker?