C compiler cannot create executables

Posted & filed under howTo.

Peach of a problem this one. Installing openLDAP, running configure with CPPFLAGS and LDFLAGS set, get this error:

C compiler cannot create executables

Problem was missing -I and -L from the compiler settings!