ive been trying to connect my c program and a postgre database using VC++. but i cant compile it because it cant find "postgres_fe.h". and also i cant find any tutorials about this one too. When i searched google, most are for linux. if anyone here knows some links to a site pls post here. any help will be greatly appreciated.

11 Years
Discussion Span
Last Post by ~s.o.s~

Are you allowed to use third party API's in your project? If so, then try using sqlapi, a C++ library for connecting to SQL databases.


as much as posible i shouldnt use third party. but if i cant use the standard il have to use third party as last resource.

thanks for the reply


one more question .

sqlapi is a wrapper of libpq of postgres how can i use sqlapi if libpq also does not exist in my machine.


Ah, scrap the sqlapi, it just offers a trial version unless you order it, so I guess it is out.

The only option left with you is to download the API provided by PostgreSQL instead. This page is your last hope.


yep. i really dont have much background in c and databases. its only been a month since i started learning c/c++ and first time in using database. :'(


i have solve this problem. hehehe. i reinstalled my postgres. and i found out that their where some uncheck boxes during my install.

thanks for the help guys!

Votes + Comments
Thanks for the follow up, would help some other beginner.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.