Jump to content

Recommended Posts

Posted

Trying to follow the installation guide at http://getmangos.eu/community/showthread.php?7839-[GUIDE]-Ubuntu-Debian-CentOS-RHEL-Install-Guide

I am building on Fedora 12 (current updates) - postgresql 8.4.2:

$ cat /etc/redhat-release
Fedora release 12 (Constantine)
$ rpm -qi postgresql-devel
Name        : postgresql-devel             Relocations: (not relocatable)
Version     : 8.4.2                             Vendor: Fedora Project
Release     : 1.fc12                        Build Date: Wed 16 Dec 2009 05:02:18 PM EST
Install Date: Fri 12 Mar 2010 03:57:02 PM EST      Build Host: localhost
Group       : Development/Libraries         Source RPM: postgresql-8.4.2-1.fc12.src.rpm
Size        : 5014894                          License: MIT
Signature   : RSA/8, Thu 17 Dec 2009 05:09:21 AM EST, Key ID 9d1cc34857bbccba
Packager    : Fedora Project
URL         : [url]http://www.postgresql.org/[/url]
Summary     : PostgreSQL development header files and libraries
Description :
The postgresql-devel package contains the header files and libraries
needed to compile C or C++ applications which will directly interact
with a PostgreSQL database management server and the ecpg Embedded C
Postgres preprocessor. You need to install this package if you want to
develop applications which will interact with a PostgreSQL server.

Received this build failure:

  CXX    QueryResultPostgre.o
../../../../src/shared/Database/QueryResultPostgre.cpp: In member function ‘Field::DataTypes QueryResultPostgre::ConvertNativeType(Oid) const’:
../../../../src/shared/Database/QueryResultPostgre.cpp:84: error: ‘BPCHAROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:85: error: ‘CIDOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:86: error: ‘CIDROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:87: error: ‘CIRCLEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:88: error: ‘INETOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:89: error: ‘NAMEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:90: error: ‘TEXTOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:91: error: ‘VARCHAROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:93: error: ‘CASHOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:94: error: ‘FLOAT4OID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:95: error: ‘FLOAT8OID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:96: error: ‘NUMERICOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:98: error: ‘DATEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:99: error: ‘RELTIMEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:100: error: ‘TIMEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:101: error: ‘TIMETZOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:102: error: ‘ABSTIMEOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:103: error: ‘INTERVALOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:104: error: ‘TIMESTAMPOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:105: error: ‘TIMESTAMPTZOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:106: error: ‘INT2OID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:107: error: ‘INT2VECTOROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:108: error: ‘INT4OID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:109: error: ‘OIDOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:110: error: ‘CHAROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:111: error: ‘INT8OID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:113: error: ‘BOOLOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:121: error: ‘LSEGOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:122: error: ‘OIDVECTOROID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:123: error: ‘PATHOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:124: error: ‘POINTOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:125: error: ‘POLYGONOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:126: error: ‘REGPROCOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:127: error: ‘TIDOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:128: error: ‘TINTERVALOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:129: error: ‘UNKNOWNOID’ was not declared in this scope
../../../../src/shared/Database/QueryResultPostgre.cpp:130: error: ‘XIDOID’ was not declared in this scope
make[5]: *** [QueryResultPostgre.o] Error 1

I know most people use MySQL rather than PostgreSQL, but I prefer to use PostgreSQL and would prefer not to install MySQL as well on my server.

  • 40 years later...
Posted

comment code in ConvertNativeType()

diff --git a/src/shared/Database/QueryResultPostgre.cpp b/src/shared/Database/QueryResultPostgre.cpp
index 7d989db..4bbf89f 100644
--- a/src/shared/Database/QueryResultPostgre.cpp
+++ b/src/shared/Database/QueryResultPostgre.cpp
@@ -78,7 +78,7 @@ void QueryResultPostgre::EndQuery()

// see types in #include <postgre/pg_type.h>
enum Field::DataTypes QueryResultPostgre::ConvertNativeType(Oid  pOid ) const
-{
+{/*
    switch (pOid)
    {
        case BPCHAROID:
@@ -112,12 +112,12 @@ enum Field::DataTypes QueryResultPostgre::ConvertNativeType(Oid  pOid ) const
            return Field::DB_TYPE_INTEGER;
        case BOOLOID:
            return Field::DB_TYPE_BOOL;                     // Bool
-/*
+
        case BOXOID:    Rect;
        case LINEOID:   Rect;
        case VARBITOID: BitArray;
        case BYTEAOID:  ByteArray;
-*/
+
        case LSEGOID:
        case OIDVECTOROID:
        case PATHOID:
@@ -130,7 +130,7 @@ enum Field::DataTypes QueryResultPostgre::ConvertNativeType(Oid  pOid ) const
        case XIDOID:
        default:
            return Field::DB_TYPE_UNKNOWN;
-    }
+    }*/
    return Field::DB_TYPE_UNKNOWN;
}
#endif 

Posted

The following also fixes it for me, not sure which one is better though. Thoughts?

diff --git a/src/shared/Database/QueryResultPostgre.h b/src/shared/Database/QueryResultPostgre.h
index 420b685..20e84f0 100644
--- a/src/shared/Database/QueryResultPostgre.h
+++ b/src/shared/Database/QueryResultPostgre.h
@@ -26,7 +26,7 @@
#include <postgre/pg_type.h>
#else
#include <libpq-fe.h>
-//#include <pg_type.h>
+#include <postgre/pg_type.h>
#endif

class QueryResultPostgre : public QueryResult

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use