Thread: compiling Postgres using Visual C++ 6.0

compiling Postgres using Visual C++ 6.0

From
Jack Ewing
Date:
Hi,

I wanted know if Postgres can  be compiled using
Microsoft Visual C++ 6.0 compiler.

Is it required to use gcc compiler with cygwin.


Jack Ewing

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

Re: compiling Postgres using Visual C++ 6.0

From
"Tim Finch, FosterFinch Ltd"
Date:
Neither, as PostgreSQL is now a compiled binary contributed package into
Cygwin, and installation couldn't be simpler than using the GUI installer
Cygwin with a few lines of command line typing to do once installed. There
is however the need to download an extra package and install that thats not
in Cygwin, called cygipc. No compilation needed. PostgreSQL needs the
cygwin UNIX abstraction layer which provides the UNIX api to programs when
they are running on Windows.
Hope that helps.
Tim

At 22:46 09/03/2002 -0800, Jack Ewing wrote:
>Hi,
>
>I wanted know if Postgres can  be compiled using
>Microsoft Visual C++ 6.0 compiler.
>
>Is it required to use gcc compiler with cygwin.




Native win32 Libpq

From
"Cyril VELTER"
Date:
Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
available ?

        TIA

            cyril


Re: Native win32 Libpq

From
Jason Tishler
Date:
Cyril,

On Tue, Mar 12, 2002 at 01:02:20PM +0100, Cyril VELTER wrote:
> Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
> available ?

A better, long-term solution is finish the work to get libpq.dll to build
with Mingw or Cygwin's gcc -mno-cygwin.  Since you have the itch, would
you be willing?  Try searching the archives for previous work.  I can
help you find the posts, if necessary.

Jason

Re: Native win32 Libpq

From
"Cyril VELTER"
Date:
> On Tue, Mar 12, 2002 at 01:02:20PM +0100, Cyril VELTER wrote:
> > Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
> > available ?
>
> A better, long-term solution is finish the work to get libpq.dll to build
> with Mingw or Cygwin's gcc -mno-cygwin.  Since you have the itch, would
> you be willing?  Try searching the archives for previous work.  I can
> help you find the posts, if necessary.
>
> Jason

    Yes that seems like a good idea.

    I've found christof Petig patch and started from that. I've made a new
target for mingw (template, makefile ...)

    After some hacks, pq.dll build.

    I use mingw under cygwin (mingw is installed under /usr/local/mingw,
/usr/local/mingw/bin first in PATH) and have the following problem :
    * since there is no specific uname for mingw there is no way for
configure to choose the correct template (have to  force it
with --with-template=mingw)
    * there seem to be a problem with make and symlinks. The build work only
when I replace symlink with plain file (no such file or directory error).
This one is quite annoying because of all the symlinked postgres files
(Makefile.port, md5.c dllist.c ....)  How does the cygwin build handle that
?
    * there is some warning in the compilation about missing prototypes of
GetCurrentFiber / GetFiberData (seem to be a mingw thing ?)
    * gethostbyname is not detected properly by configure (need to modifiy
manually pg_config.h)

    As of now only libpq can be built by running make in the libpq
directory. Some modifications needs to be make to the Makefile to prevent
building unsupported parts.

    I also try to build libpq but 'optarg' 'optind' 'getarg' 'getind' symbol
are missing ....

    If there is enough interest (and if I manage to solve previous
problems), I could try to make a patch for introduction in the main tree.

                cyril


Re: Native win32 Libpq

From
Gerhard Häring
Date:
* Cyril VELTER <cyril.velter@metadys.com> [2002-03-12 13:02 +0100]:
> Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
> available?

I could do that. However, I prefer the GNU compilers. On my homepage, you can
find a patch to PostgreSQL which adds Makefiles for building with the the mingw
mode of Cygwin.

Gerhard
--
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Native win32 Libpq

From
Gerhard Häring
Date:
* Jason Tishler <jason@tishler.net> [2002-03-13 07:41 -0500]:
> Cyril,
>
> On Tue, Mar 12, 2002 at 01:02:20PM +0100, Cyril VELTER wrote:
> > Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
> > available ?
>
> A better, long-term solution is finish the work to get libpq.dll to build
> with Mingw or Cygwin's gcc -mno-cygwin.  Since you have the itch, would
> you be willing?  Try searching the archives for previous work.  I can
> help you find the posts, if necessary.

An even better solution is to not use the Cygwin mingw mode, but to use the
native mingw build environment instead. Part of the mingw project is msys,
which is basically a stripped down version of the autoconf toolchain for
*native* win32 programs only. It's available from mingw's Sourceforge site.

Btw. I'm currently trying to hack Python's autoconf-based build process for
msys/mingw.

Gerhard
--
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Native win32 Libpq

From
Gerhard Häring
Date:
* Cyril VELTER <cyril.velter@metadys.com> [2002-03-15 17:12 +0100]:
>
> > On Tue, Mar 12, 2002 at 01:02:20PM +0100, Cyril VELTER wrote:
> > > Can somebody with access to visualC++ make native 7.2 libpq.dll binaires
> > > available ?
> >
> > A better, long-term solution is finish the work to get libpq.dll to build
> > with Mingw or Cygwin's gcc -mno-cygwin.  Since you have the itch, would
> > you be willing?  Try searching the archives for previous work.  I can
> > help you find the posts, if necessary.
> >
> > Jason
>
>     Yes that seems like a good idea.
>
> I've found christof Petig patch and started from that. I've made a new
> target for mingw (template, makefile ...)
>
>     After some hacks, pq.dll build.
>
> I use mingw under cygwin (mingw is installed under /usr/local/mingw,
> /usr/local/mingw/bin first in PATH) and have the following problem :
>     * since there is no specific uname for mingw there is no way for
> configure to choose the correct template (have to  force it
> with --with-template=mingw)

This problem goes away if you use msys instead, as you will have a mingw uname
there.

> [...]
>     As of now only libpq can be built by running make in the libpq
> directory. Some modifications needs to be make to the Makefile to prevent
> building unsupported parts.

Avoiding to build unsupported parts is the only ugly stuff.

It should be perfectly possible to build everything with a mingw/msys toolchain
that can be build with Vi$ual Studio, including the C++ libraries, the "easy"
libraries, and the ODBC driver. It was just that I didn't care for them, as all
I needed was libpq.

Gerhard
--
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))