Thread: compiling with Visual Studio

compiling with Visual Studio

From
Joe Conway
Date:
I'm trying to get PL/R binaries built on Windows, which I have not been
able to do successfully since the switch to Visual Studio from MinGW in
PostgreSQL 8.3. For some reason the MinGW PL/R binary does not load in
the VS compiled Postgres. Everything works if I also build PostgreSQL
with MinGW, but most people want to grab the standard binary release of
Postgres and combine it with a precompiled binary PL/R.

So in any case, my questions are:

1) Can Postgres be compiled with VS 2008 yet?
2) If not, does anyone have a link for VS 2005? I haven't been able to
locate it on the MS site.
3) Once I get Postgres compiling under VS, is the compilation of contrib
libraries automated as part of the build, or is there anything special I
would need to do?

Thanks,

Joe


Re: compiling with Visual Studio

From
Magnus Hagander
Date:
On Sun, Dec 13, 2009 at 19:45, Joe Conway <mail@joeconway.com> wrote:
> I'm trying to get PL/R binaries built on Windows, which I have not been
> able to do successfully since the switch to Visual Studio from MinGW in
> PostgreSQL 8.3. For some reason the MinGW PL/R binary does not load in
> the VS compiled Postgres. Everything works if I also build PostgreSQL
> with MinGW, but most people want to grab the standard binary release of
> Postgres and combine it with a precompiled binary PL/R.
>
> So in any case, my questions are:
>
> 1) Can Postgres be compiled with VS 2008 yet?

No.

> 2) If not, does anyone have a link for VS 2005? I haven't been able to
> locate it on the MS site.

Yes. I'm unsure if they want that public or anything, so I'll send it
to you offlist :-)

> 3) Once I get Postgres compiling under VS, is the compilation of contrib
> libraries automated as part of the build, or is there anything special I
> would need to do?

The buildscript that's there can generate buildfiles for contrib. I
haven't used it to build "external contrib modules", but it's probably
a pretty good start. If not, just steal the project file from another
contrib module and modify the files it references (yeah, I know,
ugly..)

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


Re: compiling with Visual Studio

From
Joe Conway
Date:
On 12/13/2009 10:48 AM, Magnus Hagander wrote:
>> 2) If not, does anyone have a link for VS 2005? I haven't been able to
>> locate it on the MS site.
>
> Yes. I'm unsure if they want that public or anything, so I'll send it
> to you offlist :-)

Thanks!

>> 3) Once I get Postgres compiling under VS, is the compilation of contrib
>> libraries automated as part of the build, or is there anything special I
>> would need to do?
>
> The buildscript that's there can generate buildfiles for contrib. I
> haven't used it to build "external contrib modules", but it's probably
> a pretty good start. If not, just steal the project file from another
> contrib module and modify the files it references (yeah, I know,
> ugly..)

Thanks, that helps. I don't care if it's ugly, as long as it works ;-)

Joe



Re: compiling with Visual Studio

From
Dimitri Fontaine
Date:
Le 13 déc. 2009 à 19:48, Magnus Hagander a écrit :
> The buildscript that's there can generate buildfiles for contrib. I
> haven't used it to build "external contrib modules", but it's probably
> a pretty good start. If not, just steal the project file from another
> contrib module and modify the files it references (yeah, I know,
> ugly..)

Or, well, you have loads of time in your hand so you can port PGXS support to windows building, and this way when
extensionsare another PostgreSQL facility this problem is already solved. So easy to say it I couldn't resist :) 

Regards,
--
dim