pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedBuild problems with MS VC++ Express 2005
6+ messages / 3 participants
[nested] [flat]
* Build problems with MS VC++ Express 2005
@ 2007-07-18 18:06 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Re: Build problems with MS VC++ Express 2005 Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
0 siblings, 1 reply; 6+ messages in thread
From: Sailesh Krishnamurthy @ 2007-07-18 18:06 UTC (permalink / raw)
To: pgsql-odbc
Hello
I’m having trouble building the ODBC driver on Windows with MS VC++ Express 2005.
I already visited the recent thread: http://archives.postgresql.org/pgsql-odbc/2007-06/msg00006.php
Unfortunately, the suggestions made by Mark Cave-Ayland don’t work for me ☹
I’ve done the following:
1. Modified my stock 8.2.4 PostgreSQL interface to include the dev stuff
2. Edited psqlodbc.rc to change: #include “afxres.h” to #include “mfc/afxres.h”
3. Copied C:\OpenSSL\lib\VC\ssleay32MT.lib to C:\OpenSSL\lib\VC\ssleay32.lib
4. Installed Microsoft VC++ 2005 Express (I’m cheap)
5. Installed Microsoft Windows SDK
When I try to build using VC++ IDE, I get a whole set of errors that say: cannot open "windows.h"
When I try to build using nmake (whether I use the shell that’s part of the windows SDK or VC++) I end up with an error that says cannot open "mfc/afxres.h" (prior to the editing of psqlodbc.rc I got an error that says cannot open "afxres.h").
Any suggestions ?
Detailed error messages follows:
Case 1: Building with VC++ IDE
==============================
1>------ Build started: Project: psqlODBC, Configuration: Debug Win32 ------
1>Compiling...
1>win_unicode.c
1>c:\documents and settings\sailesh\desktop\code\psqlodbc\psqlodbc.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
1>win_md5.c
... ....
Case 2: Building with nmake
===========================
C:\Documents and Settings\sailesh\Desktop\code\head-psqlodbc>nmake MTDC=no /f wi
n32.mak Release=CFG All
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
Building the PostgreSQL Unicode 3.5 Driver for Win32...
No configuration specified. Defaulting to Release.
Using default PostgreSQL Include directory: C:\Program Files\PostgreSQL\8.2\incl
ude
Using default PostgreSQL Library directory: C:\Program Files\PostgreSQL\8.2\lib\
ms
Using default OpenSSL Include directory: C:\OpenSSL\include
Using default OpenSSL Library directory: C:\OpenSSL\lib\VC
Linking static Multithread library
rc.exe /l 0x809 /d "MULTIBYTE" /d "NDEBUG" /fo.\Release\psqlodbc.res /D
"UNICODE_SUPPORT" psqlodbc.rc
psqlodbc.rc(10) : fatal error RC1015: cannot open include file 'mfc/afxres.h'.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\r
c.exe"' : return code '0x1'
Stop.
--
Regards
Sailesh Krishnamurthy
Co-Founder & Chief Architect
Truviso, Inc.
http://www.truviso.com
[W]: (650) 242-3503
[C]: (650) 804-6585
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Build problems with MS VC++ Express 2005
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
@ 2007-07-19 00:02 ` Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
2007-07-19 08:58 ` Re: Build problems with MS VC++ Express 2005 Dave Page <dpage@postgresql.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi Saito @ 2007-07-19 00:02 UTC (permalink / raw)
To: Sailesh Krishnamurthy <skrishnamurthy@truviso.com>; +Cc: pgsql-odbc
Hi Sailesh-san.
It seems that you need to arrange according to the following.
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Regards,
Hiroshi Saito
----- Original Message -----
From: "Sailesh Krishnamurthy"
> Hello
>
> I’m having trouble building the ODBC driver on Windows with MS VC++ Express 2005.
>
> I already visited the recent thread:
> http://archives.postgresql.org/pgsql-odbc/2007-06/msg00006.php
>
> Unfortunately, the suggestions made by Mark Cave-Ayland don’t work for me ☹
>
> I’ve done the following:
>
> 1. Modified my stock 8.2.4 PostgreSQL interface to include the dev stuff
> 2. Edited psqlodbc.rc to change: #include “afxres.h” to #include “mfc/afxres.h”
> 3. Copied C:\OpenSSL\lib\VC\ssleay32MT.lib to C:\OpenSSL\lib\VC\ssleay32.lib
> 4. Installed Microsoft VC++ 2005 Express (I’m cheap)
> 5. Installed Microsoft Windows SDK
>
> When I try to build using VC++ IDE, I get a whole set of errors that say: cannot open
> "windows.h"
>
> When I try to build using nmake (whether I use the shell that’s part of the windows SDK
> or VC++) I end up with an error that says cannot open "mfc/afxres.h" (prior to the editing
> of psqlodbc.rc I got an error that says cannot open "afxres.h").
>
> Any suggestions ?
>
> Detailed error messages follows:
>
> Case 1: Building with VC++ IDE
> ==============================
>
> 1>------ Build started: Project: psqlODBC, Configuration: Debug Win32 ------
> 1>Compiling...
> 1>win_unicode.c
> 1>c:\documents and settings\sailesh\desktop\code\psqlodbc\psqlodbc.h(21) : fatal error
> C1083: Cannot open include file: 'windows.h': No such file or directory
> 1>win_md5.c
> ... ....
>
> Case 2: Building with nmake
> ===========================
>
> C:\Documents and Settings\sailesh\Desktop\code\head-psqlodbc>nmake MTDC=no /f wi
> n32.mak Release=CFG All
>
> Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Building the PostgreSQL Unicode 3.5 Driver for Win32...
>
> No configuration specified. Defaulting to Release.
>
> Using default PostgreSQL Include directory: C:\Program Files\PostgreSQL\8.2\incl
> ude
> Using default PostgreSQL Library directory: C:\Program Files\PostgreSQL\8.2\lib\
> ms
> Using default OpenSSL Include directory: C:\OpenSSL\include
> Using default OpenSSL Library directory: C:\OpenSSL\lib\VC
> Linking static Multithread library
> rc.exe /l 0x809 /d "MULTIBYTE" /d "NDEBUG" /fo.\Release\psqlodbc.res /D
> "UNICODE_SUPPORT" psqlodbc.rc
> psqlodbc.rc(10) : fatal error RC1015: cannot open include file 'mfc/afxres.h'.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\r
> c.exe"' : return code '0x1'
> Stop.
>
> --
> Regards
> Sailesh Krishnamurthy
> Co-Founder & Chief Architect
> Truviso, Inc.
> http://www.truviso.com
> [W]: (650) 242-3503
> [C]: (650) 804-6585
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Build problems with MS VC++ Express 2005
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Re: Build problems with MS VC++ Express 2005 Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
@ 2007-07-19 08:58 ` Dave Page <dpage@postgresql.org>
2007-07-19 17:32 ` Re: Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 19:02 ` Re: Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
0 siblings, 2 replies; 6+ messages in thread
From: Dave Page @ 2007-07-19 08:58 UTC (permalink / raw)
To: Hiroshi Saito <z-saito@guitar.ocn.ne.jp>; +Cc: Sailesh Krishnamurthy <skrishnamurthy@truviso.com>; pgsql-odbc
Hiroshi Saito wrote:
> Hi Sailesh-san.
>
> It seems that you need to arrange according to the following.
> http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Agreed - and to avoid any future confusion, follow *all* steps in there,
including any marked as optional.
Regards, Dave
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Build problems with MS VC++ Express 2005
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Re: Build problems with MS VC++ Express 2005 Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
2007-07-19 08:58 ` Re: Build problems with MS VC++ Express 2005 Dave Page <dpage@postgresql.org>
@ 2007-07-19 17:32 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
1 sibling, 0 replies; 6+ messages in thread
From: Sailesh Krishnamurthy @ 2007-07-19 17:32 UTC (permalink / raw)
To: Dave Page <dpage@postgresql.org>; Hiroshi Saito <z-saito@guitar.ocn.ne.jp>; +Cc: pgsql-odbc
Hello Hiroshi-San and Dave
Thanks a lot for the tips. I'm quite the windows noob.
I managed to get things working fine now. It might be nice to be add
these links to the "Compiling on win32 page".
One more thing I found while building the Installer: before building the
installer it's necessary to run the build twice, once with
ANSI_VERSION=yes and once with ANSI_VERSION=no - this way we get both
the Release and the MultiByteRelease directories, which are both
required by the installer.
--
Regards
Sailesh Krishnamurthy
Co-Founder & Chief Architect
Truviso, Inc.
http://www.truviso.com
[W]: (650) 242-3503
[C]: (650) 804-6585
-----Original Message-----
From: Dave Page [mailto:dpage@postgresql.org]
Sent: Thursday, July 19, 2007 1:59 AM
To: Hiroshi Saito
Cc: Sailesh Krishnamurthy; pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Build problems with MS VC++ Express 2005
Hiroshi Saito wrote:
> Hi Sailesh-san.
>
> It seems that you need to arrange according to the following.
> http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Agreed - and to avoid any future confusion, follow *all* steps in there,
including any marked as optional.
Regards, Dave
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Build problems with MS VC++ Express 2005
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Re: Build problems with MS VC++ Express 2005 Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
2007-07-19 08:58 ` Re: Build problems with MS VC++ Express 2005 Dave Page <dpage@postgresql.org>
@ 2007-07-19 19:02 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 19:24 ` Re: Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
1 sibling, 1 reply; 6+ messages in thread
From: Sailesh Krishnamurthy @ 2007-07-19 19:02 UTC (permalink / raw)
To: Dave Page <dpage@postgresql.org>; Hiroshi Saito <z-saito@guitar.ocn.ne.jp>; +Cc: pgsql-odbc
Folks
Just FYI, but I managed to find a simpler alternate solution to what was
described in the link (of course, both Visual C++ Express and the
Platform SDK must be installed).
I just run the following script (I call it setup.bat) in a normal shell
and that sets up everything I need to build ODBC using nmake:
C:\Documents and Settings\sailesh\Desktop\code>type setup.bat
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
call "C:\Program Files\Microsoft Platform SDK\SetEnv.Cmd"
C:\Documents and Settings\sailesh\Desktop\code>setup
C:\Documents and Settings\sailesh\Desktop\code>call "C:\Program
Files\Microsoft
Visual Studio 8\VC\vcvarsall.bat"
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
Attempting to detect a Microsoft Visual Studio installation
Targeting Windows XP 32 DEBUG
C:\Documents and Settings\sailesh\Desktop\code>
--
Regards
Sailesh Krishnamurthy
Co-Founder & Chief Architect
Truviso, Inc.
http://www.truviso.com
[W]: (650) 242-3503
[C]: (650) 804-6585
-----Original Message-----
From: Dave Page [mailto:dpage@postgresql.org]
Sent: Thursday, July 19, 2007 1:59 AM
To: Hiroshi Saito
Cc: Sailesh Krishnamurthy; pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Build problems with MS VC++ Express 2005
Hiroshi Saito wrote:
> Hi Sailesh-san.
>
> It seems that you need to arrange according to the following.
> http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Agreed - and to avoid any future confusion, follow *all* steps in there,
including any marked as optional.
Regards, Dave
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Build problems with MS VC++ Express 2005
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Re: Build problems with MS VC++ Express 2005 Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
2007-07-19 08:58 ` Re: Build problems with MS VC++ Express 2005 Dave Page <dpage@postgresql.org>
2007-07-19 19:02 ` Re: Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
@ 2007-07-19 19:24 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
0 siblings, 0 replies; 6+ messages in thread
From: Sailesh Krishnamurthy @ 2007-07-19 19:24 UTC (permalink / raw)
To: pgsql-odbc
Trust Outlook to mess up my email ...
My script, setup.bat contains the following:
===================================================================
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
call "C:\Program Files\Microsoft Platform SDK\SetEnv.Cmd"
===================================================================
--
Regards
Sailesh Krishnamurthy
Co-Founder & Chief Architect
Truviso, Inc.
http://www.truviso.com
[W]: (650) 242-3503
[C]: (650) 804-6585
-----Original Message-----
From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Sailesh
Krishnamurthy
Sent: Thursday, July 19, 2007 12:03 PM
To: Dave Page; Hiroshi Saito
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Build problems with MS VC++ Express 2005
Folks
Just FYI, but I managed to find a simpler alternate solution to what was
described in the link (of course, both Visual C++ Express and the
Platform SDK must be installed).
I just run the following script (I call it setup.bat) in a normal shell
and that sets up everything I need to build ODBC using nmake:
C:\Documents and Settings\sailesh\Desktop\code>type setup.bat
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
call "C:\Program Files\Microsoft Platform SDK\SetEnv.Cmd"
C:\Documents and Settings\sailesh\Desktop\code>setup
C:\Documents and Settings\sailesh\Desktop\code>call "C:\Program
Files\Microsoft
Visual Studio 8\VC\vcvarsall.bat"
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
Attempting to detect a Microsoft Visual Studio installation
Targeting Windows XP 32 DEBUG
C:\Documents and Settings\sailesh\Desktop\code>
--
Regards
Sailesh Krishnamurthy
Co-Founder & Chief Architect
Truviso, Inc.
http://www.truviso.com
[W]: (650) 242-3503
[C]: (650) 804-6585
-----Original Message-----
From: Dave Page [mailto:dpage@postgresql.org]
Sent: Thursday, July 19, 2007 1:59 AM
To: Hiroshi Saito
Cc: Sailesh Krishnamurthy; pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Build problems with MS VC++ Express 2005
Hiroshi Saito wrote:
> Hi Sailesh-san.
>
> It seems that you need to arrange according to the following.
> http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Agreed - and to avoid any future confusion, follow *all* steps in there,
including any marked as optional.
Regards, Dave
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2007-07-19 19:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-07-18 18:06 Build problems with MS VC++ Express 2005 Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 00:02 ` Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
2007-07-19 08:58 ` Dave Page <dpage@postgresql.org>
2007-07-19 17:32 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 19:02 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
2007-07-19 19:24 ` Sailesh Krishnamurthy <skrishnamurthy@truviso.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox