Search code examples
c++makefileg++poco-librariesldflags

Build poco libraries with custom linkflags


I'm trying to build the poco libraries with mudflap support, which requires extra compilation and link flags. I have figured out that the POCO_FLAGS variable in config.make controls the compiler flags. How do I specify link flags?

The documentation here talks about LINKFLAGS, LINKFLAGS32, and LINKFLAGS64, but I cannot figure out how to specify these, either by using ./configure or by modifying the config.make file.


Edit:

I tried setting the environment variable LINKFLAGS, but this had no effect.


Solution

  • I abandoned looking for a simple way to specify poco's linkflags. I ended up removing the libs (rm -rf $POCO_ROOT/lib) and running make to get the output of the linker step that poco's build system runs to build the libraries. I copied the output into a file and manually added in the linkflags that I needed. I also had to change the make[1]: Entering directory... lines to cd .... I then ran the file as a bash script. All seems to be working. If someone posts a simpler way to do this involving the configure script or environment variables or hacking the makefile, I'll accept that answer.