Thread: Link error when use Pgtypes function in windows

Link error when use Pgtypes function in windows

From
Fanbin Meng
Date:

Hi:

I installed PostgreSQL9.0 from EnterpriseDB with“one click installer”  in windows 7 & 32bit.

and use microsoft visual studio 2010 c++.

I added the libpq.lib to the link property of the project, also included the lib folder and path.

Successfully compiled .c and .cpp file after  transfer .pgc file to .c file using ECPG.

But it always have errors like this when link:

error LNK2019: unresolved external symbol _PGTYPESinterval_new referenced in function.

And all the function PGTYPEStimestamp  and PGTYPEsinterval can cause the same error.

Does someone can help me?

Thanks.

Fanbin

Re: Link error when use Pgtypes function in windows

From
Maciek Sakrejda
Date:
> Does someone can help me?

You may want to try pgsql-general instead of this list.
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

Re: Link error when use Pgtypes function in windows

From
Robert Haas
Date:
On Fri, May 13, 2011 at 12:22 PM, Maciek Sakrejda <msakrejda@truviso.com> wrote:
>> Does someone can help me?
>
> You may want to try pgsql-general instead of this list.

Yeah, this isn't a performance question.

But I wonder if the problem might be that the OP needs to link with
the ecpg library, not just libpq.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company