After linking, you can use the following command to find out what .so files your exe depends on and whether those can be found with the default load time search for .so files
Please post the output of that. Before I can deduce any details of why a symbol might be missing at load time, I need to understand what .so files are needed/found.
But my best guess based on just the info you provided is that the linker found some version of liblapacke.so at link time, but the loader found a different version at load time. You need the one found at load time to be the same as the one found at link time.
There are a few different ways to control which .so files are found during load time. One way is to set the LD_LIBRARY_PATH environment variable before running the exe. Another is to specify the full path of the .so to the linker.
The first method could be done with a command such as
In many of my projects, I have a tiny bash script for executing the program. The script sets LD_LIBRARY_PATH then executes the program. If you are doing the command manually rather than in a script, only do it once per shell session; don't do it again each time you run the exe.
I think the second method can be accomplished by using the full path and name of the .so file without a -l instead of -llapacke
Check the directory listing to be sure, but I think that full path and name might be:
I hope some other expert comments here. I'm not entirely confident the methods I have used for forcing the right .so to be found are best practice.