Thread: compiling ODBC on windows

compiling ODBC on windows

From
PG User
Date:
Hi All,
I am following the following document for compiling the code on windows:

But I am finding it hard to compile. I have few questions:

1. I tried using visual studio express 12 and 10 without MFC. Is MFC required?
I am getting errors:
"afxres.h" does not exists
I got error as undefined IDC_STATIC

2. Even I tried nmake option, but I am getting an error as
c:\XXX\psqlodbc-09.01.0100>nmake /f win32.mak CFG=Release ALL

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Building the PostgreSQL Unicode 3.5 Driver for Win32...

Using default PostgreSQL Include directory: C:\Program Files (x86)\PostgreSQL\9.
1\include
Using default PostgreSQL Library directory: C:\Program Files (x86)\PostgreSQL\9.
1\lib
Linking static Multithread library
Using default OpenSSL Include directory: C:\OpenSSL\include
Using default OpenSSL Library directory: C:\OpenSSL\lib\VC
CPP_PROJ=/nologo /MT /O2 /D "NDEBUG" /W3 /EHsc /I "C:\Program Files (x86)\Postgr
eSQL\9.1\include" /I "C:\OpenSSL\include" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D
 "_USRDLL" /D "_CRT_SECURE_NO_DEPRECATE" /D "PSQLODBC_EXPORTS" /D "WIN_MULTITHRE
AD_SUPPORT"  /D "SSL_DLL=\""SSLEAY32.dll"\"" /D USE_SSL /D RESET_CRYPTO_CALLBACK
S /D "DYNAMIC_LOAD" /D "_HANDLE_ENLIST_IN_DTC_" /GS /D "UNICODE_SUPPORT" /D "ODB
CVER=0x0351" /Fp".\Release\psqlodbc.pch" /Fo".\Release"\ /Fd".\Release"\ /FD
        if not exist ".\Release/" mkdir ".\Release"
        cl.exe @C:\Users\ADMINI~1\AppData\Local\Temp\2\nm9EB5.tmp
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\cl.exe"' : return code '0xc0000135'
Stop.

Do you know the reason?

Thanking you.

- Nachiket


Re: compiling ODBC on windows

From
Hiroshi Inoue
Date:
(2014/04/17 8:24), PG User wrote:
> Hi All,
> I am following the following document for compiling the code on windows:
> http://psqlodbc.projects.pgfoundry.org/docs/win32-compilation.html
>
> But I am finding it hard to compile. I have few questions:
>
> 1. I tried using visual studio express 12 and 10 without MFC. Is MFC
> required?
> I am getting errors:
> "afxres.h" does not exists
> I got error as undefined IDC_STATIC

The recommendation is to use MSBuild for VC10 or later.
Please look at readme_winbuild.txt or winbuild/readme.txt.

regards,
Hiroshi Inoue