Closed JohanCarlsen closed 2 years ago
Hi @JohanCarlsen!
What are the exact compilation and linking command(s) you use?
And was there more info in the error message? I.e. were there some specific symbol names mentioned?
g++ main.cpp src/particle.cpp -std=c++11 -I include -o main.exe
Undefined symbols for architecture x86_64: "thread-local wrapper routine for arma::mt19937_64_instance", referenced from: arma::(anonymous namespace)::mt19937_64_instance_warmup::mt19937_64_instance_warmup() in main-73a770.o arma::(anonymous namespace)::mt19937_64_instance_warmup::mt19937_64_instance_warmup() in particle-08d362.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
It's really hard to understand any of this, but it seems armadillo is complaining..
Oh s**t, I forgot the -larmadillo
LOL, now it worked. Haha!
Oh s**t, I forgot the -larmadillo
Indeed :D
Happy to hear it's working now!
Reminds me of the lecture where the lady talking about report writing. She mentioned that talking about your problem often makes it more clear! =)
I know -- the same keeps happening to me all the time :)
Btw, if you're curious about the actual missing symbol, it was probably related to the fact that you call some random number generator via Armadillo. At least the "mt19937" name should refer to the Mersenne Twister algorithm for generating random numbers. (More on that later in the course.)
Hi! I am trying to create the classes, but when i test out compiling and linking, I get an error message
Undefined symbols for architecture x86_64
symbol(s) not found for architecture x86_64
Link to repo: https://github.com/Madssb/FYS3150_H22_4_pers/tree/johan/Project_3