Re: Linux equivalent library for "postgres.lib" from Windows

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Linux equivalent library for "postgres.lib" from Windows
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B5397A972@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Linux equivalent library for "postgres.lib" from Windows  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
John R Pierce wrote:
>> I am new to the product and in windows “postgres.lib” provides certain functions which we are
>> using in windows for creating extensions.
>> 
>> Now I am porting the project to Linux and there no straight library with this name in Linux
>> binaries packages.
>> 
>> Can someone please advise the equivalent library for postgres.lib in Linux?
> 
> I am not sure what this postgres.lib is, what are the functions you're using ?

With MSVC, you have to link with the mylibrary.lib file if you want to use
functions from the shared library mylibrary.dll.
This is not necessary on Linux, where references to a shared library are resolved
at load time.

So the answer to the original question is that there is no replacement
for postgres.lib on Linux because you don't need it to link with PostgreSQL.
It is enough to #include the required PostgreSQL headers during compilation.

Some information on how to link on Linux can be found here:
https://www.postgresql.org/docs/current/static/xfunc-c.html#DFUNC
But as others have remarked, using PGXS is much better than doing
it by hand.

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Durumdara
Дата:
Сообщение: Re: Surviving connections after internet problem
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: Surviving connections after internet problem