[psqlODBC 08.02.0401] Compiling fails on VS2005SP1

[psqlODBC 08.02.0401] Compiling fails on VS2005SP1

am 31.05.2007 20:28:09 von Rainer Bauer

Hi,

I have checked out the latest source and tried to compile it without success.

1>C:\Program Files\VS8\VC\include\crtdbg.h(628) : warning C4005: '_malloca' :
macro redefinition
1> C:\Program Files\VS8\VC\include\malloc.h(217) : see previous
definition of '_malloca'

This error is related to the _CRTDBG_MAP_ALLOC definition in these files:
psqlodbc.h, inouealc.c and win_unicode.c. If I add _MEMORY_DEBUG_ to the
preprocessor defines the error goes away.

Could it be that this is because I am using the latest Windows SDK and
VS2005SP1?

Linking fails, because ssleay32.lib is not found. I checked the OpenSSL
installation and the Visual C++ libraries are located in "C:\OpenSSL\lib\VC"
and are named depending on the target (single/multi threaded, release/debug,
etc.). But since ssleay32.lib is defined in the linker input project settings
this cannot work. Shouldn't the lib name be generated dynamically depending on
the target which is build and specified in the source with pragma's?

Rainer

PS: By default the project is set up to create the Unicode driver. Am I right
to assume that in order to build the ANSI version I have to remove
UNICODE_SUPPORT and set ODBCVER to 0x0300?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: [psqlODBC 08.02.0401] Compiling fails on VS2005SP1

am 31.05.2007 21:08:42 von Rainer Bauer

I wrote:

>Linking fails, because ssleay32.lib is not found. I checked the OpenSSL
>installation and the Visual C++ libraries are located in "C:\OpenSSL\lib\VC"
>and are named depending on the target (single/multi threaded, release/debug,
>etc.). But since ssleay32.lib is defined in the linker input project settings
>this cannot work. Shouldn't the lib name be generated dynamically depending on
>the target which is build and specified in the source with pragma's?

After manually copying and renaming the lib files
(C:\OpenSSL\lib\VC\ssleay32MTd.lib -> ~\psqlodbc\ssleay32.lib and
C:\OpenSSL\lib\VC\libeay32MTd.lib -> ~\psqlodbc\libeay32.lib) I have another
linker error:

LINK : fatal error LNK1104: cannot open file 'pgenlist.lib'

Where do I get that from?

Rainer

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Re: [psqlODBC 08.02.0401] Compiling fails on VS2005SP1

am 01.06.2007 02:45:38 von Hiroshi Inoue

Rainer Bauer wrote:
> I wrote:
>
>> Linking fails, because ssleay32.lib is not found. I checked the OpenSSL
>> installation and the Visual C++ libraries are located in "C:\OpenSSL\lib\VC"
>> and are named depending on the target (single/multi threaded, release/debug,
>> etc.). But since ssleay32.lib is defined in the linker input project settings
>> this cannot work. Shouldn't the lib name be generated dynamically depending on
>> the target which is build and specified in the source with pragma's?
>
> After manually copying and renaming the lib files
> (C:\OpenSSL\lib\VC\ssleay32MTd.lib -> ~\psqlodbc\ssleay32.lib and
> C:\OpenSSL\lib\VC\libeay32MTd.lib -> ~\psqlodbc\libeay32.lib) I have another
> linker error:
>
> LINK : fatal error LNK1104: cannot open file 'pgenlist.lib'

The pgenlist library is used for MSDTC support and isn't needed
unless _HANDLE_ENLIST_IN_DTC_ is defined. A #pragma in loadlib.c
seems to be the cause. I lready fixed the bug in my local source
for 8.2.0402.

regards,
Hiroshi Inoue


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate