Recently, I discovered that LibraryLink technique is a very useful tool to improve the performance of function. Firstly, I need to use LibraryLink template to write C/C++ program. Then compiling the program to dynamically linked library(i.e. *.dll file) via the
CCompilerDriver package and C compiler. Please see this answer.
If there is no error in your code, the compiling process will successful and no error information occurs. Unfortunately, there will always be some errors/bugs in the code in practice. For instance, today I applied a right algorithm to LibraryLink template to calculate the nonzero values of B-spline basis, but I forgot the variable declaration of
saved, and misuse the
In this process, I discovered that the debuging is very critical. While the error information that the
CreateLibrarygiven is very limitted. Even if the compiling process is smoothly, the bug maybe exists. Please see Update of that question. Although
NonzeroBasis gives me the result, it is wrong and I cannot debug it to find where the error is.
- If and how it is possible to attach a debugger to such a dynamically linked library on the supported operating systems?