Re: Linker errors while creating a PostgreSQL C extension function.

From: Dmitry Igrishin <dmitigr(at)gmail(dot)com>
To: Tal Glozman <glozmantal(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Linker errors while creating a PostgreSQL C extension function.
Date: 2018-08-19 12:24:26
Message-ID: CAAfz9KNSf08FqKtu+b62x5kgFa8REmEftHp6ZfHE8um2xRZ14w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

вс, 19 авг. 2018 г. в 15:07, TalGloz <glozmantal(at)gmail(dot)com>:
>
> Do you mean this command:
>
> seal_diff_cpp.so: seal_diff_cpp.o
> $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so
> seal_diff_cpp.o $(LDFLAGS)
>
> If yes then the -lseal is added with the $(LDFLAGS) at the end of the
> command.
You've defined LDFLAGS as:
LDFLAGS = -L$(INCLUDE_SEAL_LIB) -llibseal.a -lpthread

I mean it should be defined as:
LDFLAGS = -L$(INCLUDE_SEAL_LIB) -lseal -lpthread

Also, AFAIK, the command should be specified in one line, like that:
seal_diff_cpp.so: seal_diff_cpp.o
$(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so
seal_diff_cpp.o $(LDFLAGS)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message TalGloz 2018-08-19 12:46:30 Re: Linker errors while creating a PostgreSQL C extension function.
Previous Message TalGloz 2018-08-19 12:07:02 Re: Linker errors while creating a PostgreSQL C extension function.