Compiler Options for the Publisher API Shared Library

The compile.sh build script for the demo feed handler uses the compiler and link options in the table. You can also use these as examples when compiling a custom feed handler, but are not required to use the listed compilers or settings.

The table lists options for a production build. When compiling a debug build, add the -g option to the listed production options.

Compiler options for publisher APIs in compile.sh

Operating system

Supported Compiler

Compiler options

Link options

RHEL/AMD

gcc version 3.4.6.20060404 (Red Hat 3.4.6-9)

-c -Wall -Werror -fPIC -D__STDC_LIMIT_MACROS=true -m64 -O3 -Wall -Werror -fPIC -lpthread -ldl -O3 -lpublisher

Solaris SPARC

CC: Sun C++ 5.8 2005/10/13

-c -errtags=yes -KPIC -xO4 -xarch=v9" -KPIC -lpthread -ldl -lsocket -lnsl -lrt -xO4 -xarch=v9

Solaris AMD

CC: Sun C++ 5.8 2005/10/13

-c -errtags=yes -KPIC -xO4 -xarch=amd64 -xmodel=medium" -KPIC -lpthread -ldl -lsocket -lnsl -lrt -xO4 -xarch=amd64 -xmodel=medium

AIX

IBM® XL C/C++ Enterprise Edition V8.0 for AIX®

-c -D__IBM_FAST_VECTOR -qpic=large -qhalt=i -qflag=w:w -q64 -qeh=v6 -O3 -qstrict -qtune=balanced -qipa=level=1 -ldl -lpthread -qpic=large -q64 -qhalt=i -qflag=w:w -qeh=v6 -brtl -O3 -qstrict -qtune=balanced -qipa=level=1
Related tasks
Compiling a Feed Handler
Recompiling the Demo Feed Handler
Testing a Custom Feed Handler
Debugging a Custom Feed Handler