Yes, I do.
> My question is, how to link my program with the libraries(UMFPACK/Lib/
> libumfpack.a and AMD/Lib/libamd.a), and tell my compiler to look for
> include files in UMFPACK/Include and AMD/Include? Technically, I don't
> know what command I should use within gcc in Linux. I know that if I
> use LAPACK, I should use the command
> gcc *.c -llapack
> But the UMFPACK libraries/include files are not in the main library
> folder/include folder, so I'm not sure what command I should type in
> the terminal. Would you please give me some help?
The flag -Idirname but basically it will work automatically if you use
make. You can find some instructions here
>> http://matrixprogramming.com/UMFPACK/
This is not a question related to UMFPACK, but I want to use this
opportunity to ask the following about windows version of gcc. I am using
MinGW. In the piece of makefile below (which actually do nothing), why cd
$(SRCDIR) does not find the directory if I put ";" after (SRCDIR)? On the
contrary, if I remove the ";" it will find it.
SRCDIR = src
MAKE = mingw32-make
MeshFree++:
cd $(SRCDIR);
The problem is that I need the ";" since I have to execute another makefile
which will be inside SRCDIR.
Frankly speaking I do not know. Does it work on Linux? If you make a
sample makefile, I can try it under Cygwin. If it is working there then
you have to contact MinGW people.
Yes, it works in Linux and Cygwin
The problem is that ";" does not work in cmd.exe as supposed to do it.
Instead, using "&" will work ... kinda weird.
-a
Yes, you need this file and it should be in /home/UFconfig/. Please
check if this the case, and then add -I/home/UFconfig
> In file included from /home/UMFPACK/Include/umfpack.h:48,
> from 2.c:2:
> /home/UMFPACK/Include/umfpack_symbolic.h:23: error: expected ‘=’, ‘,’,
> ‘;’, ‘asm’ or ‘__attribute__’ before ‘umfpack_dl_symbolic’
If UFconfig.h not found, then it may cause problems. For simplicity I
have copied all the headers from UMFPACK to my include directory. This
are the files that I have there:
$ ls amd* umfpack* UF*
UFconfig.h umfpack_global.h
umfpack_report_triplet.h
amd.h umfpack_load_numeric.h
umfpack_report_vector.h
amd_internal.h umfpack_load_symbolic.h umfpack_save_numeric.h
umfpack.h umfpack_numeric.h
umfpack_save_symbolic.h
umfpack_col_to_triplet.h umfpack_qsymbolic.h umfpack_scale.h
umfpack_defaults.h umfpack_report_control.h umfpack_solve.h
umfpack_free_numeric.h umfpack_report_info.h umfpack_symbolic.h
umfpack_free_symbolic.h umfpack_report_matrix.h umfpack_tictoc.h
umfpack_get_determinant.h umfpack_report_numeric.h umfpack_timer.h
umfpack_get_lunz.h umfpack_report_perm.h umfpack_transpose.h
umfpack_get_numeric.h umfpack_report_status.h
umfpack_triplet_to_col.h
umfpack_get_symbolic.h umfpack_report_symbolic.h umfpack_wsolve.h
Otherwise you have to use -I with three directories for AMD, UMFPACK and
UFconfig.
The declaration of this function is in the UMFPACK headers, so you do
not have to do it in your program. You just include the umfpack header,
this should be enough.
The problem seems to be that you do not specify the libs correctly. It
should be something like this
gcc *.c -I... -L/home/UMFPACK/Lib -L/home/AMD/Lib/ -lamd -lumfpack
You may want to run this tutorial first
If your code is in C++, then you need to link with the standard C++ libs
and gcc does not do it by default. g++ on the other hand does. You can
use -v to see what a command is finally issued.