# compiling on AIX 7.1

**URL:** <https://discourse.cmake.org/t/compiling-on-aix-7-1/7955>\
**Category:** Code\
**Created:** [April 21, 2023, 1:49pm UTC](https://discourse.cmake.org/t/compiling-on-aix-7-1/7955 "2023-04-21T13:49:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cristian](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@cristian](https://discourse.cmake.org/u/cristian)\
**Post date:** [April 21, 2023, 1:49pm UTC](https://discourse.cmake.org/t/compiling-on-aix-7-1/7955/1 "2023-04-21T13:49:56Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![cristian](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@cristian](https://discourse.cmake.org/u/cristian)\
**Post date:** [April 24, 2023, 9:52am UTC](https://discourse.cmake.org/t/compiling-on-aix-7-1/7955/2 "2023-04-24T09:52:13Z")

</div>

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.
