Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oz49k-00045r-8a for pgsql-general@arkaria.postgresql.org; Sat, 26 Nov 2022 23:00:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oz49i-00083v-Oc for pgsql-general@arkaria.postgresql.org; Sat, 26 Nov 2022 23:00:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oz49i-00083l-CF for pgsql-general@lists.postgresql.org; Sat, 26 Nov 2022 23:00:18 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oz49c-0001Eu-Ap for pgsql-general@lists.postgresql.org; Sat, 26 Nov 2022 23:00:17 +0000 Received: by mail-pg1-x531.google.com with SMTP id v3so6770714pgh.4 for ; Sat, 26 Nov 2022 15:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=Sqwjpms7XrK2E9GW7uWgzfxcdt8xzAtr/O1zwZXOs94=; b=bnShdvWNmWTcP1CzyQzXPyk/wRfsVZ4SvuIqscDvovjndVwjrleBe13vF5LYgMBfgr wJrhicsFcymLG1s40UQ89Ux1ZMcZSHh9plO6s+uiLK5frO3xssQ/BeJztmrSwnDIS5Nq 6ugI+biS3E2u1fxYI+gKNGNgWGg4+VkJxBRHgY51wgyNBxpAN9j03xhPwLZzCeHoTzuc TnIU2oNR1dWq09oaYpS5FWldZw7rwdLvbTMOAWAMzvu8taO3aaLGx8T6aCWShDYdOOAD 7ldBPdxk5ple0jxLp/e6ctHtP56Wp19DB5jutJp8aIsyMwu51Xdawph3Ir998aIQloNg C6Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sqwjpms7XrK2E9GW7uWgzfxcdt8xzAtr/O1zwZXOs94=; b=k215k1mUgrHz5PmFvwvq5kozJpy2W2jvb89YQBpU1+1mtYDAh62C4Zzwv8MjU4VVk+ XUT6Up/DE4P+t99pvOvK/MYqCmwGzNWhIDdtCTMgrWEpIGLD6Og7lT5H5Q6orzWdtgy+ 5PhAOSiQxXZg4Hvz7wnUKvJYjnds0EAkav1R21b8I/MCroH9xZ4UkyCawZ45p3vWdwP3 0N+CjDmMingSLCIg7l2YcP8eIqaeOunoBULhMDpKn4155Rxkr1KxRJ1sivFwyGdgAnkP 0brTSEiy+0a6IGHH/y/0b20AN54P9csl5Q+U1AHHwB6Z8YaiUmrU3dv6GXK9KKZOECYy jnWA== X-Gm-Message-State: ANoB5plnuwF8ToZPFSYDwhWdhvpeDRrM2ZlWGdoARUFqclZzwmFvi37w QozTo4yAZwoRzYrvQUt0lXrvnbNzxjw= X-Google-Smtp-Source: AA0mqf7PKbt1p71+aIQdaW9BZH/XW8j278cQGxgetIn7CSbt1wW97BvdbiLZ7aprPHGDKGyAuP6Ezw== X-Received: by 2002:a63:1803:0:b0:477:6e5d:4e25 with SMTP id y3-20020a631803000000b004776e5d4e25mr27291622pgl.70.1669503609745; Sat, 26 Nov 2022 15:00:09 -0800 (PST) Received: from smtpclient.apple ([2601:681:5a00:f790:188d:9380:bd33:992d]) by smtp.gmail.com with ESMTPSA id f17-20020aa79d91000000b00574cf11aaf3sm2673847pfq.208.2022.11.26.15.00.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Nov 2022 15:00:09 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-E2054FF1-BDB1-4979-90B4-407ABD6BF850 Content-Transfer-Encoding: 7bit From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: collect2: error: ld returned 1 exit status Date: Sat, 26 Nov 2022 15:59:57 -0700 Message-Id: <050D1AE9-0D5B-433D-8C82-938FB5BA3191@gmail.com> References: Cc: pgsql-general@lists.postgresql.org In-Reply-To: To: William Torrez Corea X-Mailer: iPhone Mail (20B101) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-E2054FF1-BDB1-4979-90B4-407ABD6BF850 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Nov 26, 2022, at 3:43 PM, William Torrez Corea w= rote: >=20 > =EF=BB=BF > I am using libpq: the C application programmer's interface to PostgreSQL.=20= >=20 > Compile the code: >=20 >> sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq >=20 > But i get the following error: >=20 >> collect2: error: ld returned 1 exit status >=20 > --=20 And do you have at hand why the loader (ld) failed? >=20 --Apple-Mail-E2054FF1-BDB1-4979-90B4-407ABD6BF850 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Nov 26, 2022, at 3:= 43 PM, William Torrez Corea <willitc9888@gmail.com> wrote:

=EF=BB=BF
I am using libpq: the C application programmer's interface to Pos= tgreSQL.

Compile the code:

<= /div>
sudo cc -o tes= tprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq

But i get the following error:

collect2: error: ld r= eturned 1 exit status

--
=

And do you have at hand why the loader (ld) fail= ed?
= --Apple-Mail-E2054FF1-BDB1-4979-90B4-407ABD6BF850--