Any Code::Blocks user?  http://www.codeblocks.org/
Cannot compile PG-8.2.5 with WinXP SP2 using Code::Blocks.

I created a new project including ALL the files decompressed from postgresql-8.2.5.tar.gz
and then just clicked on "build". What's wrong?

Alternative ways to complie it with other IDE or any precise command line?

The error messages when building it are:

Project : Console application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\manolo\Desktop\postgresql-8.2.5\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: contrib\adminpack\adminpack.c
contrib\adminpack\adminpack.c:15:22: postgres.h: No such file or directory
contrib\adminpack\adminpack.c:21:29: catalog/pg_type.h: No such file or directory
contrib\adminpack\adminpack.c:22:21: funcapi.h: No such file or directory
contrib\adminpack\adminpack.c:23:23: miscadmin.h: No such file or directory
contrib\adminpack\adminpack.c:24:34: postmaster/syslogger.h: No such file or directory
contrib\adminpack\adminpack.c:25:24: storage/fd.h: No such file or directory
contrib\adminpack\adminpack.c:26:28: utils/datetime.h: No such file or directory contrib\adminpack\adminpack.c:40: warning: data definition has no type or storage class
contrib\adminpack\adminpack.c:42: error: syntax error before "pg_file_write"
contrib\adminpack\adminpack.c:42: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:42: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:43: error: syntax error before "pg_file_rename" contrib\adminpack\adminpack.c:43: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:43: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:44: error: syntax error before "pg_file_unlink" contrib\adminpack\adminpack.c:44: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:44: warning: data definition has no type or storage class
contrib\adminpack\adminpack.c:45: error: syntax error before "pg_logdir_ls"
contrib\adminpack\adminpack.c:45: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:45: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:47: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:47: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:48: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:48: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:49: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:49: warning: data definition has no type or storage class contrib\adminpack\adminpack.c:50: warning: parameter names (without types) in function declaration contrib\adminpack\adminpack.c:50: warning: data definition has no type or storage class
contrib\adminpack\adminpack.c:55: error: syntax error before "DIR"
contrib\adminpack\adminpack.c:55: warning: no semicolon at end of struct or union contrib\adminpack\adminpack.c:56: warning: data definition has no type or storage class
contrib\adminpack\adminpack.c:69: error: syntax error before '*' token
contrib\adminpack\adminpack.c: In function `convert_and_check_filename':
contrib\adminpack\adminpack.c:71: error: `arg' undeclared (first use in this function) contrib\adminpack\adminpack.c:71: error: (Each undeclared identifier is reported only once
contrib\adminpack\adminpack.c:71: error: for each function it appears in.)
contrib\adminpack\adminpack.c:71: error: `VARHDRSZ' undeclared (first use in this function) contrib\adminpack\adminpack.c:72: warning: initialization makes pointer from integer without a cast contrib\adminpack\adminpack.c:74: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast contrib\adminpack\adminpack.c:81: error: `ERROR' undeclared (first use in this function) contrib\adminpack\adminpack.c:82: error: `ERRCODE_INSUFFICIENT_PRIVILEGE' undeclared (first use in this function) contrib\adminpack\adminpack.c:88: error: `DataDir' undeclared (first use in this function) contrib\adminpack\adminpack.c:91: error: `logAllowed' undeclared (first use in this function) contrib\adminpack\adminpack.c:92: error: `Log_directory' undeclared (first use in this function) contrib\adminpack\adminpack.c:99: error: `NULL' undeclared (first use in this function)
contrib\adminpack\adminpack.c: In function `requireSuperuser':
contrib\adminpack\adminpack.c:115: error: `ERROR' undeclared (first use in this function) contrib\adminpack\adminpack.c:116: error: `ERRCODE_INSUFFICIENT_PRIVILEGE' undeclared (first use in this function)
contrib\adminpack\adminpack.c: At top level:
contrib\adminpack\adminpack.c:127: error: syntax error before "pg_file_write"
contrib\adminpack\adminpack.c: In function `pg_file_write':
contrib\adminpack\adminpack.c:129: error: `FILE' undeclared (first use in this function) contrib\adminpack\adminpack.c:129: error: `f' undeclared (first use in this function) contrib\adminpack\adminpack.c:131: error: `text' undeclared (first use in this function) contrib\adminpack\adminpack.c:131: error: `data' undeclared (first use in this function) contrib\adminpack\adminpack.c:132: error: `int64' undeclared (first use in this function)
contrib\adminpack\adminpack.c:132: error: syntax error before "count"
contrib\adminpack\adminpack.c:136: error: `false' undeclared (first use in this function) contrib\adminpack\adminpack.c:144: error: `ERROR' undeclared (first use in this function) contrib\adminpack\adminpack.c:145: error: `ERRCODE_DUPLICATE_FILE' undeclared (first use in this function) contrib\adminpack\adminpack.c:161: error: `count' undeclared (first use in this function) contrib\adminpack\adminpack.c:161: error: `VARHDRSZ' undeclared (first use in this function) contrib\adminpack\adminpack.c:161: warning: passing arg 1 of `fwrite' makes pointer from integer without a cast
contrib\adminpack\adminpack.c: At top level:
contrib\adminpack\adminpack.c:175: error: syntax error before "pg_file_rename"
contrib\adminpack\adminpack.c: In function `pg_file_rename':
contrib\adminpack\adminpack.c:187: error: `false' undeclared (first use in this function) contrib\adminpack\adminpack.c:196: error: `WARNING' undeclared (first use in this function) contrib\adminpack\adminpack.c:213: error: `errno' undeclared (first use in this function) contrib\adminpack\adminpack.c:213: error: `ENOENT' undeclared (first use in this function) contrib\adminpack\adminpack.c:215: error: `ERROR' undeclared (first use in this function) contrib\adminpack\adminpack.c:216: error: `ERRCODE_DUPLICATE_FILE' undeclared (first use in this function) contrib\adminpack\adminpack.c:247: error: `ERRCODE_UNDEFINED_FILE' undeclared (first use in this function) contrib\adminpack\adminpack.c:260: error: `true' undeclared (first use in this function)
contrib\adminpack\adminpack.c: At top level:
contrib\adminpack\adminpack.c:265: error: syntax error before "pg_file_unlink"
contrib\adminpack\adminpack.c: In function `pg_file_unlink':
contrib\adminpack\adminpack.c:271: error: `false' undeclared (first use in this function) contrib\adminpack\adminpack.c:275: error: `errno' undeclared (first use in this function) contrib\adminpack\adminpack.c:275: error: `ENOENT' undeclared (first use in this function)
Process terminated with status 1 (0 minutes, 19 seconds)
52 errors, 22 warnings


--------------------------------------------------
From: "Kris Jurka" <[EMAIL PROTECTED]>
Sent: Saturday, December 01, 2007 7:41 AM
To: "Jaime Casanova" <[EMAIL PROTECTED]>
Cc: "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] compiling postgres in winxp



On Sat, 1 Dec 2007, Jaime Casanova wrote:

i'm trying to compile postgres in winxp for the first time in order to
try recent Magnus patch discussed here
http://archives.postgresql.org/pgsql-hackers/2007-11/msg01307.php

/mingw/lib/gcc/mingw32/3.4.5/../../../../include/sys/time.h:27: error:
redefinition of `struct timezone'
/mingw/lib/gcc/mingw32/3.4.5/../../../../include/sys/time.h:40: error:
conflicting types for 'gettimeofday'
.../../src/include/port.h:292: error: previous declaration of
'gettimeofday' was here

Only very recently can the 8.2 release be built with recent mingw releases. Upgrade pg to the top of REL8_2_STABLE or downgrade mingw.

http://archives.postgresql.org/pgsql-committers/2007-11/msg00566.php

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to