I'm kinda new to cpp and I'm trying to compile a code making use of cuba library and quadmath as well. Since Apple gcc doesn't recognise __float128 I needed to use my brew-installed gcc while compiling:
/usr/local/bin/gcc-11 ...
then I add
... -lstdc++ ...
for the code I need to compile is a .cpp and finally I include the libraries and includes I need. So the compiler is called with
/usr/local/bin/gcc-11 -o test sigmavT.cpp ./lib/*.a -I./include -lstdc++
problem is I'm obtaining the following message:
ld: warning: ignoring file ./lib/libcuba.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_llVegas", referenced from:
_main in ccQTpUvC.o
"_powq", referenced from:
__ZL10IntegrandEPKiPKdS0_PdPv in ccQTpUvC.o
"_quadmath_snprintf", referenced from:
__ZN12_GLOBAL__N_1lsERSoRKg in ccQTpUvC.o
"_sqrtq", referenced from:
__ZL10IntegrandEPKiPKdS0_PdPv in ccQTpUvC.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Which I'm guessing is a sort of incompatibility between cuba library and the gcc compiler.
Thanks for your time!
edit. Searching a bit more I've noticed that there's no libquadmath in arm64 gcc. is that solved?