Unix Technical Forum

Note: Compiling on Windows with free Microsoft compilers

This is a discussion on Note: Compiling on Windows with free Microsoft compilers within the Pgsql General forums, part of the PostgreSQL category; --> All Though I understand the MinGW environment is recommended for compiling all of PostGreSQL on Windows, one can (as ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 08:29 PM
Brian K Boonstra
 
Posts: n/a
Default Note: Compiling on Windows with free Microsoft compilers

All

Though I understand the MinGW environment is recommended for compiling
all of PostGreSQL on Windows, one can (as stated in the documentation)
use MSVC to compile just the essential client stuff (psql, libpq.dll,
libpq.lib).

This is just a note to observe that the same is possible without
shelling out for MSVC. Microsoft makes the identical optimizing
compiler available in a command-line version at

http://msdn.microsoft.com/visualc/vctoolkit2003/

It does not have all the libraries you need (in particular
MSVCRT.lib)....so it is also necessary to get the Platform SDK at

http://www.microsoft.com/msdownload/...sdk/sdkupdate/


I also grabbed the .NET framework development kit from

http://msdn.microsoft.com/netframewo...s/default.aspx



Once you have installed all that stuff, you need to make sure that
nmake.exe, cl.exe and link.exe are in your $PATH (mostly taken care of
by the batch-file-command-shell included with the compiler). Then, I
found it necessary to modify win32.mak in the interfaces/ subdirectory
of the postgresql source distribution with a linker directive telling
it where to find MSVCRT.lib. I did this by putting setting
LOPT=/LIB:<dirpath> win win32.mak.


Hope that helps somebody.


- Brian


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 08:59 PM
Bruce Momjian
 
Posts: n/a
Default Re: Note: Compiling on Windows with free Microsoft compilers


I have taken your information, added a Borland download URL, and added
it to our documentation:

http://candle.pha.pa.us/main/writing...all-win32.html

Thanks.

---------------------------------------------------------------------------

Brian K Boonstra wrote:
> All
>
> Though I understand the MinGW environment is recommended for compiling
> all of PostGreSQL on Windows, one can (as stated in the documentation)
> use MSVC to compile just the essential client stuff (psql, libpq.dll,
> libpq.lib).
>
> This is just a note to observe that the same is possible without
> shelling out for MSVC. Microsoft makes the identical optimizing
> compiler available in a command-line version at
>
> http://msdn.microsoft.com/visualc/vctoolkit2003/
>
> It does not have all the libraries you need (in particular
> MSVCRT.lib)....so it is also necessary to get the Platform SDK at
>
> http://www.microsoft.com/msdownload/...sdk/sdkupdate/
>
>
> I also grabbed the .NET framework development kit from
>
> http://msdn.microsoft.com/netframewo...s/default.aspx
>
>
>
> Once you have installed all that stuff, you need to make sure that
> nmake.exe, cl.exe and link.exe are in your $PATH (mostly taken care of
> by the batch-file-command-shell included with the compiler). Then, I
> found it necessary to modify win32.mak in the interfaces/ subdirectory
> of the postgresql source distribution with a linker directive telling
> it where to find MSVCRT.lib. I did this by putting setting
> LOPT=/LIB:<dirpath> win win32.mak.
>
>
> Hope that helps somebody.
>
>
> - Brian
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>


--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:06 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com