Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkWw-0008LS-6k for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 13:47:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frkWu-0001Qb-HC for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 13:47:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkWu-0001QU-9T for pgsql-general@lists.postgresql.org; Mon, 20 Aug 2018 13:47:36 +0000 Received: from mail.verite.pro ([185.16.44.216]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frkWq-0003uW-EB for pgsql-general@postgresql.org; Mon, 20 Aug 2018 13:47:35 +0000 Received: from genius-map.net (verite.pro [195.154.189.246]) by mail.verite.pro (Postfix) with ESMTP id 5018F8C0030; Mon, 20 Aug 2018 15:43:29 +0200 (CEST) Received: by genius-map.net (Postfix, from userid 1001) id 6D62538A1C17; Mon, 20 Aug 2018 15:47:30 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: Linker errors while creating a PostgreSQL C extension function. From: "Daniel Verite" To: "TalGloz" Cc: pgsql-general@postgresql.org In-Reply-To: <1534704516779-0.post@n3.nabble.com> Date: Mon, 20 Aug 2018 15:47:26 +0200 Message-Id: <1e79e673-5580-45be-8dc2-fd92db81af28@manitou-mail.org> X-Mailer: Manitou v1.7.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk TalGloz wrote: > Do I have to replace my -shared in the link command with -fPIC? No, but -fPIC should go into your CXXFLAGS. The pgxs makefile handles CFLAGS, but as it doesn't do C++, you're on your own for CXXFLAGS. Best regards, --=20 Daniel V=E9rit=E9 PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite