Static and Shared Library in Makefile

I am having a devil of a time with a very simple make file. The program needs two shared and one static library. If I link the shared libraries only like below the mysql test app works

------------------------------------------------------------------------------------------------------------------------

CXX := g++
CXXFLAGS := -I/usr/include/mysql -I /usr/include/mysql++
LDFLAGS := -L /usr/lib64 -lmysqlclient -lmysqlpp -L /usr/lib64/mysql
 EXECUTABLE := DigArchive

all: $(EXECUTABLE)

-----------------------------------------------------------------------------------------------
If I try to bring in the static library as shown below, I suddenly get an error:
/usr/bin/ld: cannot find -lmysqlpp

------------------------------------------------------------------------------------------------

CXX := g++
CXXFLAGS := -I/usr/include/mysql -I /usr/include/mysql++
LDFLAGS := -L /usr/lib64 -lmysqlclient -lmysqlpp -L /usr/lib64/mysql -static -L./ -lRmtDirTree
EXECUTABLE := DigArchive

all: $(EXECUTABLE)

-----------------------------------------------------------------------------------------------

The static library is in the same folder as the program. I must be doing something wrong with the command structure.
BTW: Having the same issue trying to use scons to do this

Any ideas?

You shoud not need the -static flag. I assume that libRmtDirTree.a is the static lib you try to add? If removing the -static flag does not help, try to simply add ./libRmtDirTree.a at the end of the linker command.

HtH, Andre.