1

I am trying to use the armadillo library in my C++ program. I have installed Armadillo version 10.7.4 and all its dependencies using HomeBrew on MacOS 12.0.1 Monterey that has Apple clang version 11.

The compiler does not output any errors when run with $ g++ -std=c++11 -larmadillo -o hello helloWorld.cpp

#include <iostream>
#include <armadillo>
using namespace std;
int main() {
cout << "Hello world!" << endl;
return 0;
}

But when I open the compiled file, I get the following output:

dyld[34344]: Symbol not found: ___addtf3
Referenced from: /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgfortran.5.dylib
Expected in: /usr/lib/libSystem.B.dylib
Abort trap: 6

I have tried solutions for similar Symbol not found errors but nothing seems to fix it. When I check /usr/lib/ I also don't find a file libSystem.B.dylib

If anyone knows how to solve this issue I would appreciate the help.

0 Answers0