c++ bulider to postgres

hi...I tried to connect my postgresql db to a simple program c++ borland 6. I can't open the connection with the db. I tried with:
#include "libpq-fe.h "

PGconn *conn;
conn=PQsetdbLogin("localhost", "5432", NULL, NULL, "fatture", "postgres", "0000") ;
I've got always the same error:
Unresolved external '_PQsetdbLogin' referenced from C:DOCUMENTS AND SETTINGSADMINISTRATORDOCUMENTIRAD STUDIOPROJECTSDEBUGMAINALEX.OBJ

What I've gotta do??Help me thanks!

Comments

  • : hi...I tried to connect my postgresql db to a simple program c++
    : borland 6. I can't open the connection with the db. I tried with:
    : #include "libpq-fe.h "
    :
    : PGconn *conn;
    : conn=PQsetdbLogin("localhost", "5432", NULL, NULL, "fatture",
    : "postgres", "0000") ;
    : I've got always the same error:
    : Unresolved external '_PQsetdbLogin' referenced from C:DOCUMENTS AND
    : SETTINGSADMINISTRATORDOCUMENTIRAD
    : STUDIOPROJECTSDEBUGMAINALEX.OBJ
    :
    : What I've gotta do??Help me thanks!
    :

    An unresolved external error denotes that you have #included the function and class declarations (in libpq-fe.h), but you have not added the implementation file (.cpp) to your project.

    I'd suggest to try to do 'Project | Add to project' and then select the file 'libpq-fe.cpp' (I hope you have this file :-) ).

    Good luck,
    Bilderbikkel


    bilderbikkel
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion