to link statically some libraries

We are writing some short programs that use some API libraries to be
executed in shell scripts. As loading the shared API library takes 2 or
3 times the execution time, we’d like to link them to the static
version. But, we’d like to use the libc.so.

How to obtain the following command line with a recursive makefile:

qcc -o prog prog.o -lc -Bstatic -lmyAPI

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

We are writing some short programs that use some API libraries to be
executed in shell scripts. As loading the shared API library takes 2 or
3 times the execution time, we’d like to link them to the static
version. But, we’d like to use the libc.so.

How to obtain the following command line with a recursive makefile:

qcc -o prog prog.o -lc -Bstatic -lmyAPI

add

LD_OPTS += -Bstatic -lmyAPI -Bdynamic

to your common.mk


cburgess@qnx.com