Thread: compile a program witn libpq64 (error LIBCMT.Lib...)
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
Try to use libpqdll.lib instead of libpq.lib.
--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company
On Thu, Mar 18, 2010 at 7:30 PM, elekis <elekis@gmail.com> wrote:
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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
it's seems works thansk a++ On Thu, Mar 18, 2010 at 3:16 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote: > Try to use libpqdll.lib instead of libpq.lib. > -- > Ashesh Vashi > EnterpriseDB INDIA: Enterprise Postgres Company > > > > On Thu, Mar 18, 2010 at 7:30 PM, elekis <elekis@gmail.com> wrote: >> >> 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 >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general > > -- http://twoji.deviantart.com/ http://www.flickr.com/elekis