Re: collect2: error: ld returned 1 exit status

Поиск
Список
Период
Сортировка
От William Torrez Corea
Тема Re: collect2: error: ld returned 1 exit status
Дата
Msg-id CAGiORHfFmxqqwdodLA31D-sgUsoueDAtp+3RxxC3aG9RhpHL4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: collect2: error: ld returned 1 exit status  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: collect2: error: ld returned 1 exit status  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general


On Sat, Nov 26, 2022 at 5:00 PM Rob Sargent <robjsargent@gmail.com> wrote:


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


I am using libpq: the C application programmer's interface to PostgreSQL.

Compile the code:

sudo cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq

But i get the following error:

collect2: error: ld returned 1 exit status

--

And do you have at hand why the loader (ld) failed?


Package libpq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpq' found

--

With kindest regards, William.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀


В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: collect2: error: ld returned 1 exit status
Следующее
От: Tom Lane
Дата:
Сообщение: Re: collect2: error: ld returned 1 exit status