error linking with PostgreSQL

From: Daniel <danwgrace(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: error linking with PostgreSQL
Date: 2009-11-23 01:03:02
Message-ID: 1e4ca1fe-61c3-416a-a1ae-af736c9f21c3@v37g2000vbb.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Here is the code:
#include "libpq-fe.h"

#ifndef HDBUTIL
#define HDBUTIL

class DBConn
{
public:
PGconn pg_conn;
bool Connect();
bool Disconnect();
};

#endif

... and here is the make error:

tux tb # make
g++ -Wall -g -o0 -lpq -I/usr/include/postgresql/libpq-4 server.cpp
db_util.cpp player.cpp -o tbserver.exe -L/usr/lib64 `wx-config --
cxxflags` `wx-config --libs`
In file included from server.h:10,
from server.cpp:24:
db_util.h:11: error: field 'pg_conn' has incomplete type

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bino Oetomo 2009-11-23 01:47:00 How is the right query for this condition ?
Previous Message Daniel 2009-11-23 01:00:31 Re: How to link with postgresql in gcc?