Re: Dynamic loading of C functions

Поиск
Список
Период
Сортировка
От Jasbinder Bali
Тема Re: Dynamic loading of C functions
Дата
Msg-id a47902760606201425l5916b1f5q6fe5a23db346039e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Dynamic loading of C functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
yes, i've named it as .so file.

On 6/20/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Jasbinder Bali" <jsbali@gmail.com> writes:
>>> /usr/include/pgsql/server/ is exactly the path where test_func object
>>> file resides.

Hmmm .... when you say "object file", do you mean it's really named
"test_func.o"?

If so, that's both the wrong name and the wrong type of file.  Postgres
is looking for a shared library, eg "test_func.so" (or on some platforms
".sl" or ".dylib").  There's some advice in our manual about the
compiler switches to use to create a shared library, or see your
compiler documentation.

Given AS '/usr/include/pgsql/server/test_func', Postgres will look for
both "test_func" and "test_func.so" (not sure which order, try the LOAD
reference page for details).  It won't look for "test_func.o" though.

BTW, most people would say that /usr/include is exactly where NOT to
put an executable file ... conventionally this kind of file goes under
/usr/lib.  That's not what's causing your problem, it's just a question
of keeping your filesystem tidy enough to be able to find things again.

                       regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Dynamic loading of C functions
Следующее
От: "Erin Sheldon"
Дата:
Сообщение: Re: Dynamic loading of C functions