Re: Problem with compiling C function

From: "Reini Urban" <rurban(at)x-ray(dot)at>
To: "Maciej Grygorcewicz" <maciekgrygorcewicz(at)gmail(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problem with compiling C function
Date: 2008-01-10 00:41:13
Message-ID: 6910a60801091641r3f28af97i7a474ed706d4b06b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

2008/1/9, Maciej Grygorcewicz :
> But linker threw such errors:
> "
> Unresolved External: _pgwin32_fopen referended from .... // and so on
> Unresolved External: _pg_sprintfl referended from .... // and so on "
>
> Why???? I have included postgres.h , and all other required files .

-lpgport is needed.

> I tried to build almost the same code but in C++ style DLL.
> DLL file was created succesfully , but on the other hand postgreSQL couldn't
> find exported function...
> DLL was in non-undernstadable format for postgresql.

for c++ you have to wrap the postgresql functions into extern "C".

--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://spacemovie.mur.at/ http://helsinki.at/

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message Maciej Grygorcewicz 2008-01-14 22:26:21 Re :Problem with Compiling C function
Previous Message Maciej Grygorcewicz 2008-01-09 17:23:31 Problem with compiling C function