#C_libpq_linking_error.md Issue was resolved. Solution was performed on Ubuntu 20.04 using WSL2 for Windows10. Compilation command needed a path to libpq resources for linking. The default path to this directory is typically /usr/include/postgresql. Test file // test.c #include <stdio.h> #include <stdlib.h> #include <libpq-fe.h> int main(int argc, char **argv){ printf("\nHello World\n\n"); return 0; } Error $ gcc test.c -lpq -o test test.c:3:10: fatal error: libpq-fe.h: No such file or directory 3 | #include <libpq-fe.h> | ^~~~~~~~~~~~ compilation terminated. Solution # Required Bash commands sudo apt update sudo apt-get install libpq-dev gcc test.c -I/usr/include/postgresql -lpq -o test ./test Hello World