Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	TalGloz wrote:

> If yes then the -lseal is added with the $(LDFLAGS) at the end of the
> command.

But it doesn't happen because LDFLAGS is overriden by the
makefile included just after you set it. The relevant part
copy-pasted from your mail:

   LDFLAGS = -L$(INCLUDE_SEAL_LIB) -llibseal.a -lpthread
   include $(PGXS)
   seal_diff_cpp.so: seal_diff_cpp.o
	  $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so
   seal_diff_cpp.o $(LDFLAGS)

As as solution, you could leave LDFLAGS alone and use a different
variable, or include $(PGXS) first and *append* your options to
LDFLAGS if your prefer. 
For instance (replacing -llibseal.a with -lseal while at it):

   SEAL_LDFLAGS = -L$(INCLUDE_SEAL_LIB) -lseal -lpthread
   include $(PGXS)
   seal_diff_cpp.so: seal_diff_cpp.o
	  $(CXX) -Wl,--no-undefined -shared -o seal_diff_cpp.so
   seal_diff_cpp.o $(LDFLAGS) $(SEAL_LDFLAGS)


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux