While compiling against openssl-1.1.1c I get the following error when compiling tls.c

In file included from tls.c:83:0:
dh_params.h: In function 'get_dhParams':
dh_params.h:33:4: error: dereferencing pointer to incomplete type 'DH {aka struct dh_st}'
  dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
    ^

I have searched the net and saw this problem mentioned elsewhere:


I have tried with different GCC versions - all show the same problem.
OPENSSL_NO_DH is undefined!