Re: MinGW-W64 compile error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: MinGW-W64 compile error
Date: 2015-11-04 03:05:19
Message-ID: 10762.1446606319@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=" <l(dot)rame(at)griensu(dot)com> writes:
> Hi, I'm trying to build the client library of PostgreSql 9.3.x using
> this version of MinGW's gcc:
> ...
> g++ -DFRONTEND -I../../src/include -I./src/include/port/win32
> -DEXEC_BACKEND "-I../../src/include/port/win32" -DBUILDING_DLL -c -o
> relpath.o relpath.c

Why is it invoking g++ and not gcc?

> relpath.c: In function 'int forkname_chars(const char*, ForkNumber*)':
> relpath.c:55:15: error: invalid conversion from 'int' to 'ForkNumber'
> [-fpermissive]
> for (forkNum = 1; forkNum <= MAX_FORKNUM; forkNum++)
> relpath.c:55:51: error: no 'operator++(int)' declared for postfix '++'
> [-fpermissive]
> for (forkNum = 1; forkNum <= MAX_FORKNUM; forkNum++)

The second of these definitely comes from trying to compile C code as C++,
and I think the first does too.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sami Pietilä 2015-11-04 06:32:20 Re: How to search a string inside a json structure
Previous Message Jim Nasby 2015-11-04 02:48:18 Re: Deadlock detected after pg_repack receives SIGINT