Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Newbie help with PostgreSQL example
icon5.gif  Newbie help with PostgreSQL example [message #15771] Wed, 07 May 2008 16:44 Go to previous message
Rottweiler is currently offline  Rottweiler
Messages: 10
Registered: May 2008
Location: Heber Springs, Arkansas, ...
Promising Member
Hi, total newbie here. I'm trying to learn how easy it is to interface to a PostgreSQL database from U++.

I've installed 2008.1Beta2. I'm trying to run the example code for accessing a PostgreSQL database as shown here:

http://www.ultimatepp.org/reference$SQL_PostgreSql.html

But I'm getting this:
----- PostgresExample ( MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 )
Postgres.cpp
In file included from C:\Projects\upp\PostgresExample\/Postgres.h:13,
                 from C:\Projects\upp\PostgresExample\Postgres.cpp:1:
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:8:22: error: libpq-fe.h: No such file or directory
In file included from C:\Projects\upp\PostgresExample\/Postgres.h:13,
                 from C:\Projects\upp\PostgresExample\Postgres.cpp:1:
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:52: error: ISO C++ forbids declaration of 'PGconn' with no type
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:52: error: expected ';' before '*' token
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:53: error: ISO C++ forbids declaration of 'PGresult' with no type
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:53: error: expected ';' before '*' token
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:66: error: expected type-specifier before 'PGconn'
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:75: error: ISO C++ forbids declaration of 'PGconn' with no type
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:75: error: expected ';' before '*' token
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:76: error: expected `;' before '}' token
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h: In member function 'virtual bool Upp::PostgreSQLSession::IsOpen() cons
	t':
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:35: error: 'conn' was not declared in this scope
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h: In member function 'Upp::String Upp::PostgreSQLSession::GetUser()':
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:65: error: 'conn' was not declared in this scope
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:65: error: 'PQuser' was not declared in this scope
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h: In constructor 'Upp::PostgreSQLSession::PostgreSQLSession()':
C:\upp\uppsrc/PostgreSQL/PostgreSQL.h:73: error: 'conn' was not declared in this scope
C:\Projects\upp\PostgresExample\Postgres.cpp: In member function 'bool PostgreSQLTest::OpenDB()':
C:\Projects\upp\PostgresExample\Postgres.cpp:64: error: 'POSTGRESS' was not declared in this scope
PostgresExample: 1 file(s) built in (0:08.18), 8188 msecs / file, duration = 8235 msecs

There were errors. (0:08.25)


I don't have a libpq-fe.h file and some of the other errors seem to be within the upp sources. Is there a more recent version of this example code or can someone get me pointed in the right direction? Thanks.
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PostgreSQL Support Classes [Experimental]
Next Topic: sqlapp example
Goto Forum:
  


Current Time: Tue May 14 10:01:06 CEST 2024

Total time taken to generate the page: 0.01948 seconds