After upgrading my MinGW installation I started to get weird undefined reference to cabsf and cabsl. To be sure, I reinstalled MinGW from scratch (into a different directory) using the graphical installer (0.6.2). I then tried to compile the following test program:

#include <math.h>
#include <complex.h>
#include <stdio.h>

int main (int argc, char **argv)
  float complex x = 1 + 1*I;
  double complex y = 1 + 1*I;

  printf ("%g\n", cabsf (x));
  printf ("%g\n", cabs (y));

  return 0;

I then try to compile it as follows:

$ gcc -Wall -o test-cabsf test-cabsf.c -lm
C:\DOCUME~1\goffioul\LOCALS~1\Temp\ccSz5blq.o:test-cabsf.c:(.text+0x44): undefined reference to `cabsf'
collect2.exe: error: ld returned 1 exit status

AFAIK this used to be in libmingwex.a, I could verify it by using "nm" on that library from the old version of the mingwrt archive I still had in cache (3.20-2). However the same library from the newer mingwrt (4.0.3) does not contain it.

Is it a packaging bug, or have those functions been removed from the runtime libraries (or moved elsewhere)?