1

I am new running code in C++ linux environment; so, please accept my apologies in advance if I am asking very trivial question. The only reason that I switched to linux is to run the library linked below. I would consider my C++ coding skills at intermediate level.

I downloaded the code at this location (http://www.jasoncantarella.com/wordpress/software/tsnnls/). Also, needed were Lapack, Blas, Argtable2 which I downloaded before.

Now, I can run the script after changing to relevant directory:

>> cd /home/dkumar/libtsnnls-2.3.3/tsnnls/
>> ./tsnnls_test -A A_01.sparse -b b_01.mat -x x_01.mat --tsnnls

However, when I looked at your code "tsnnls_test.c", the function is defined as:

static void tsnnls_test(taucs_ccs_matrix *A,taucs_double *realx,taucs_double *b)

This function call and script call are very different. I would like to change the argument list of tsnnls_test function to make it useful for my work. I am not getting successful in just making an executable out of "tsnnls_test.c" and I do not know how script works.

My question: Since the author is not available to answer this question, I would like to ask experts here: How does this code → script thing works using GNU libtool? How should I try to change it?

Possibly, some guidance on using libtool to load a duplicate function name from a shared library would be helpful.

My intention is to get a fast solver for sparse nonnegative least square solver. If anyone has any suggestion on that, please do share with me.

Garima Singh
  • 1,410
  • 5
  • 22
  • 46
  • 1
    The *program* `tsnnls_test` and the *function* `tsnnls_test` are two very different things. You need to [learn C++ more](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list), and learn how program arguments are passed to the `main` function. – Some programmer dude Jan 19 '15 at 11:53
  • @ Joachim Pileborg My apologies for not posing question correctly. I am only new to Linux; though I have been programming in C++ using VS and I would consider myself at intermediate level (i.e. I can change codes, do object oriented programming etc) when it comes to C++. Yes, I know that function call and script calls are different. I need some guidance particularly regarding libtool. Since I am not the authors of original library and I do not know dependence etc, I have no idea how to start. – Garima Singh Jan 19 '15 at 12:26
  • Unless you add new dependencies on external libraries, there's nothing you need to worry about. Just start writing code, and let the build-system handle the building of your changes. – Some programmer dude Jan 19 '15 at 12:34
  • @JoachimPileborg Could you please direct me to some simplified resources for libtool which can get me started? Or, Possibly, some guidance on using libtool to load a duplicate function name from a shared library would be helpful. – Garima Singh Jan 19 '15 at 13:27
  • https://www.google.com/ – Some programmer dude Jan 19 '15 at 14:28

0 Answers0