compile a program witn libpq64 (error LIBCMT.Lib...) - Mailing list pgsql-general

From elekis
Subject compile a program witn libpq64 (error LIBCMT.Lib...)
Date
Msg-id 78316ea81003180700u283f6cf5kab776d0cba5e57f3@mail.gmail.com
Whole thread Raw
Responses Re: compile a program witn libpq64 (error LIBCMT.Lib...)  (Ashesh Vashi <ashesh.vashi@enterprisedb.com>)
List pgsql-general
hi all,


I try to create a dll that use postgres

in 32 bit, there is no problem, but in 64 , I have errors


cl  /W3  /LDd runtime\rcqpgsql.obj runtime\pgsql_function_utility.obj runtime\rc
qsql.obj C:\yafl\CT\bignum.obj C:\yafl\CT\CT_convert.obj runtime\error.obj runti
me\profiler.obj runtime\rcqstruct.obj runtime\utils.obj -DPROFILER_MODE -D_CRT_S
ECURE_NO_DEPRECATE -Zi "c:\Program Files\PostgreSQL\libpq64\lib\libpq.lib"  -DL_
RCQ_DLL
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:rcqpgsql.dll
/dll
/implib:rcqpgsql.lib
/debug
runtime\rcqpgsql.obj
runtime\pgsql_function_utility.obj
runtime\rcqsql.obj
C:\yafl\CT\bignum.obj
C:\yafl\CT\CT_convert.obj
runtime\error.obj
runtime\profiler.obj
runtime\rcqstruct.obj
runtime\utils.obj
"c:\Program Files\PostgreSQL\libpq64\lib\libpq.lib"
LIBCMT.lib(dosmap.obj) : error LNK2005: _dosmaperr already defined in libpq.lib(
win32error.obj)
MSVCRT.lib(MSVCR90.dll) : error LNK2005: _time64 already defined in LIBCMT.lib(t
ime64.obj)


and later

   Creating library rcqpgsql.lib and object rcqpgsql.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; us
e /NODEFAULTLIB:library
libpq.lib(thread.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLa
stError
libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol __imp_WSAG
etLastError referenced in function connectNoDelay
libpq.lib(fe-secure.obj) : error LNK2001: unresolved external symbol __imp_WSAGe
tLastError
libpq.lib(fe-misc.obj) : error LNK2001: unresolved external symbol __imp_WSAGetL




how to do to compile (and link  with libpq64).

thanks


a++





--
http://twoji.deviantart.com/
http://www.flickr.com/elekis

pgsql-general by date:

Previous
From: akp geek
Date:
Subject: Re: tables getting bloated
Next
From: Ashesh Vashi
Date:
Subject: Re: compile a program witn libpq64 (error LIBCMT.Lib...)