You can resolve this issue by following these steps:
Install the PostgreSQL development package:
sudo apt-get update
sudo apt-get install postgresql-server-dev-all
Check if libpq-fe.h file exists:
find /usr -name libpq-fe.h
If the file is found, note the path and proceed to step 3. If not, try installing the package again.
Export the header file directory path:
export C_INCLUDE_PATH=/usr/include/postgresql/
Compile your program and link it with the PostgreSQL library:
gcc -o program program.c -lpq
Replace "program" with your program name and "program.c" with your program file name.
Run your program:
./program
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-03-31 11:00:00 +0000
Seen: 11 times
Last updated: Jul 08 '21
How can the SQL debug mode be activated in PostgreSQL version 15.2?
What is the procedure for using pg_restore on Windows with Docker?
What is the equivalent of SQL Server NVARCHAR in PostgreSQL?
What is the method to retrieve the JSON data from a column in SQL?
How to solve the issue of being unable to establish a connection with libpq on Mac M1?
Is it possible to launch multiple instances of PostgreSQL using Spring Boot Testcontainers?
Due to SyntaxError, why am I unable to create a TIMESTAMP WITH TIMEZONE column in postgres?