compiling on AIX 7.1

I am compiling on AIX7.1 with cmake 3.16 and receive the following error when linking:
collect2: fatal error lib… not a COFF file
Compiler is gcc 8.3
Can anyone please give me a hint ?

I must add that here are used static libraries and between these static libraries exist circular dependencies. Can this cause the problems I am having ?

I found the problem. This was due to a false CMakeLists.txt file for the library. The c++ sources and the header sources were given as the same CMake variable.