Re: [pgsql-hackers-win32] Build with Visual Studio &

Started by Chuck McDevittover 19 years ago3 messages
#1Chuck McDevitt
cmcdevitt@greenplum.com

VC++6.0 isn't a very good compiler and it's not very compatible with
gcc, while Visual Studio 2005 compiler is much more compatible and has a
better optimizer.

Plus, VC++6.0 had a closed "proprietary" data format for .dsp and .dsw
files, while the current Visual Studio uses a standard XML format.

Finally, Microsoft gives away (as in free, no cost) Visual C++ Express
edition, which includes the current compiler.

I don't see any reason we'd want to target VC++6.0.

P.s. With the current Visual Studio, it's easy to add Bison and Flex
custom rules, so that it automatically calls them for .y and .l files.

-----Original Message-----
From: Magnus Hagander [mailto:mha@sollentuna.net]
Sent: Friday, May 05, 2006 12:42 AM
To: Gurjeet Singh; pgsql-hackers@postgresql.org; uniware@zedware.org;
Chuck McDevitt
Subject: RE: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio &
MSVC

Hi William(uniware), Chuck and Hackers,

I have been interested in doing complete PGSQL
development in MSVC for a long time now. With reference to
one of Chuck's mails to
-hackers-win32 with the same subject, you said that you were
able to successfully compile PG 8.1 with some minor tweaks.

Also, William has 'vcproject' hosted on pgfoundry, I
downloaded it, and tried compiling
vcproject\msvc\postgres\postgres.dsw on
VC++6.0. It failed miserably with over 1000 errors. I am sure there's
some tweaks needed here too!!!

Yes. There is a patch pending on -patches which fix almost all of these
in HEAD. (There are a few tiny things related to perl and NLS that
aren't included in it ATM. And I'm just assuming you're seeing the same
problems as I was but I didn't base my work off vcproject). I'm also
working on a buildscript to convert the Makefiles to visual c++ project
files, but that's not quite done yet. The idea with this work is to have
the stuff as integrated as possible with main CVS, so the maintenance
will be as low as possible - unlike the vcproject project which has been
focusing on keeping a separate build environment maintained.

The target is VC++ 2003 and 2005 ATM, but it should just be a matter of
a different output format for VC 6.0 I guess.

You will still need things like bison and flex if you want to build off
cvs, of course - there is no builtin support for that in VC++.

//Magnus

#2Dave Page
dpage@vale-housing.co.uk
In reply to: Chuck McDevitt (#1)

-----Original Message-----
From: "Chuck McDevitt"<cmcdevitt@greenplum.com>
Sent: 05/05/06 18:01:49
To: "Magnus Hagander"<mha@sollentuna.net>, "Gurjeet Singh"<singh.gurjeet@gmail.com>, "pgsql-hackers@postgresql.org"<pgsql-hackers@postgresql.org>, "uniware@zedware.org"<uniware@zedware.org>
Subject: Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio &

I don't see any reason we'd want to target VC++6.0.

The runtimes ship with every platform we support, unlike v7 or v8.

Regards, Dave

-----Unmodified Original Message-----
VC++6.0 isn't a very good compiler and it's not very compatible with
gcc, while Visual Studio 2005 compiler is much more compatible and has a
better optimizer.

Plus, VC++6.0 had a closed "proprietary" data format for .dsp and .dsw
files, while the current Visual Studio uses a standard XML format.

Finally, Microsoft gives away (as in free, no cost) Visual C++ Express
edition, which includes the current compiler.

I don't see any reason we'd want to target VC++6.0.

P.s. With the current Visual Studio, it's easy to add Bison and Flex
custom rules, so that it automatically calls them for .y and .l files.

-----Original Message-----
From: Magnus Hagander [mailto:mha@sollentuna.net]
Sent: Friday, May 05, 2006 12:42 AM
To: Gurjeet Singh; pgsql-hackers@postgresql.org; uniware@zedware.org;
Chuck McDevitt
Subject: RE: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio &
MSVC

Hi William(uniware), Chuck and Hackers,

I have been interested in doing complete PGSQL
development in MSVC for a long time now. With reference to
one of Chuck's mails to
-hackers-win32 with the same subject, you said that you were
able to successfully compile PG 8.1 with some minor tweaks.

Also, William has 'vcproject' hosted on pgfoundry, I
downloaded it, and tried compiling
vcproject\msvc\postgres\postgres.dsw on
VC++6.0. It failed miserably with over 1000 errors. I am sure there's
some tweaks needed here too!!!

Yes. There is a patch pending on -patches which fix almost all of these
in HEAD. (There are a few tiny things related to perl and NLS that
aren't included in it ATM. And I'm just assuming you're seeing the same
problems as I was but I didn't base my work off vcproject). I'm also
working on a buildscript to convert the Makefiles to visual c++ project
files, but that's not quite done yet. The idea with this work is to have
the stuff as integrated as possible with main CVS, so the maintenance
will be as low as possible - unlike the vcproject project which has been
focusing on keeping a separate build environment maintained.

The target is VC++ 2003 and 2005 ATM, but it should just be a matter of
a different output format for VC 6.0 I guess.

You will still need things like bison and flex if you want to build off
cvs, of course - there is no builtin support for that in VC++.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

#3Chuck McDevitt
cmcdevitt@greenplum.com
In reply to: Dave Page (#2)

Statically link the c library, and your problem is solved.

Or ship the dll with the installer, like any normal commercial
application would. Microsoft specifically grants the right to do this.

There is no other "runtime" besides the c library.

Either approach is simple, and doesn't tie us to an ancient compiler
(Well, it came out in the end of 1998, and I consider it ancient).

-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Friday, May 05, 2006 3:12 PM
To: Chuck McDevitt; mha@sollentuna.net; singh.gurjeet@gmail.com;

pgsql-

hackers@postgresql.org; uniware@zedware.org
Subject: Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio

&

-----Original Message-----
From: "Chuck McDevitt"<cmcdevitt@greenplum.com>
Sent: 05/05/06 18:01:49
To: "Magnus Hagander"<mha@sollentuna.net>, "Gurjeet
Singh"<singh.gurjeet@gmail.com>, "pgsql-hackers@postgresql.org"<pgsql-
hackers@postgresql.org>, "uniware@zedware.org"<uniware@zedware.org>
Subject: Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio

&

I don't see any reason we'd want to target VC++6.0.

The runtimes ship with every platform we support, unlike v7 or v8.

Regards, Dave

-----Unmodified Original Message-----
VC++6.0 isn't a very good compiler and it's not very compatible with
gcc, while Visual Studio 2005 compiler is much more compatible and has

a

better optimizer.

Plus, VC++6.0 had a closed "proprietary" data format for .dsp and .dsw
files, while the current Visual Studio uses a standard XML format.

Finally, Microsoft gives away (as in free, no cost) Visual C++ Express
edition, which includes the current compiler.

I don't see any reason we'd want to target VC++6.0.

P.s. With the current Visual Studio, it's easy to add Bison and Flex
custom rules, so that it automatically calls them for .y and .l files.

-----Original Message-----
From: Magnus Hagander [mailto:mha@sollentuna.net]
Sent: Friday, May 05, 2006 12:42 AM
To: Gurjeet Singh; pgsql-hackers@postgresql.org; uniware@zedware.org;
Chuck McDevitt
Subject: RE: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio

&

MSVC

Hi William(uniware), Chuck and Hackers,

I have been interested in doing complete PGSQL
development in MSVC for a long time now. With reference to
one of Chuck's mails to
-hackers-win32 with the same subject, you said that you were
able to successfully compile PG 8.1 with some minor tweaks.

Also, William has 'vcproject' hosted on pgfoundry, I
downloaded it, and tried compiling
vcproject\msvc\postgres\postgres.dsw on
VC++6.0. It failed miserably with over 1000 errors. I am sure

there's

some tweaks needed here too!!!

Yes. There is a patch pending on -patches which fix almost all of

these

in HEAD. (There are a few tiny things related to perl and NLS that
aren't included in it ATM. And I'm just assuming you're seeing the

same

problems as I was but I didn't base my work off vcproject). I'm also
working on a buildscript to convert the Makefiles to visual c++

project

files, but that's not quite done yet. The idea with this work is to

have

the stuff as integrated as possible with main CVS, so the maintenance
will be as low as possible - unlike the vcproject project which has

been

focusing on keeping a separate build environment maintained.

The target is VC++ 2003 and 2005 ATM, but it should just be a matter

of

a different output format for VC 6.0 I guess.

You will still need things like bison and flex if you want to build

off

cvs, of course - there is no builtin support for that in VC++.

//Magnus

---------------------------(end of

broadcast)---------------------------

Show quoted text

TIP 5: don't forget to increase your free space map settings