Re :Problem with Compiling C function

View: New views
2 Messages — Rating Filter:   Alert me  

Re :Problem with Compiling C function

by Maciej Grygorcewicz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Thanks for the response. But I have few questions
Is this a compiler / linker switch . Can I turn it on on Builder . or have I to use gcc or g++??

> 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".
Yes , I am wrapping exported functions in extern "C" . But it doesn't work.
Maybe I have to wrapp all functions , but this is  never ending work - I have in project many files from Jpeglib library...
--
Pozdrawiam

Maciej Grygorcewicz
maciekgrygorcewicz@... ,
prometeusz1@...
GG 1638280

Re: Re :Problem with Compiling C function

by Reini Urban :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/1/14, Maciej Grygorcewicz :

> 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.
>
> Thanks for the response. But I have few questions
> Is this a compiler / linker switch . Can I turn it on on Builder . or have I
> to use gcc or g++??

We only support the gnu compiler on cygwin. I don't know builder.
Better ask at the -win32 list.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match