LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-05-2009, 04:07 PM   #1
vielmaj
LQ Newbie
 
Registered: Jun 2009
Posts: 24
Blog Entries: 1

Rep: Reputation: 0
lapack++ compile code


I installed lapack++ version 2.5.3 for matrix multiplication in C++. After I configure, then make, and then make install, it puts the c includes files in /usr/local/include/lapackpp/ which are given below

arch.h bmd.h gmf.h lapackc.h lautil.h spdmd.h ultgmd.h
bfd.h f2c.h gmi.h lapackd.h lavc.h spdtrmd.h utgmd.h
blas1.h fmd.h gmli.h lapack.h lavd.h sybfd.h uutgmd.h
blas1pp.h genmd.h lacomplex lapackpp.h laversion.h sybmd.h vc.h
blas2.h gfd.h lacomplex.h laprefs.h lavi.h syfd.h vd.h
blas2pp.h gfqrc.h lacvd.h larvd.h lavli.h symd.h vf.h
blas3.h gfqrd.h laexcp.h laslv.h ltgmd.h sytrmd.h vi.h
blas3pp.h gmc.h lafnames.h lasvd.h spdbmd.h trfd.h vli.h
blaspp.h gmd.h laindex.h latmpl.h spdfd.h trmd.h

and also the following files in /usr/local/lib

-rwxr-xr-x 1 root root 884 2009-10-05 10:34 liblapackpp.la
lrwxrwxrwx 1 root root 21 2009-10-05 10:34 liblapackpp.so -> liblapackpp.so.14.2.0
lrwxrwxrwx 1 root root 21 2009-10-05 10:34 liblapackpp.so.14 -> liblapackpp.so.14.2.0
-rwxr-xr-x 1 root root 2579202 2009-10-05 10:34 liblapackpp.so.14.2.0

Now I try to compile using, (g++-4.3 example.cpp), the very simple code of

#include "lapackpp/lapackpp.h"
int main() {

return 0;
}

and I get the following output.

In file included from /usr/local/include/lapackpp/lapackc.h:14,
from /usr/local/include/lapackpp/lapack.h:10,
from /usr/local/include/lapackpp/lapackpp.h:16,
from example.cpp:1:
/usr/local/include/lapackpp/lacomplex.h:45:23: error: laversion.h: No such file or directory
/usr/local/include/lapackpp/lacomplex.h:48:17: error: f2c.h: No such file or directory
In file included from /usr/local/include/lapackpp/lapackpp.h:47,
from example.cpp:1:
/usr/local/include/lapackpp/latmpl.h:36:22: error: lafnames.h: No such file or directory

I am not sure what I am doing wrong.

Jason
 
Old 10-06-2009, 12:02 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vielmaj View Post

[ snip ]
from example.cpp:1:
/usr/local/include/lapackpp/latmpl.h:36:22: error: lafnames.h: No such file or directory

I am not sure what I am doing wrong.

Jason
The installation failed to provide these headers in the right order and the right locations. Any chance you could get "lapack" ready-made for your platform? It happens to be readily available in precompiled form on many distributions:

Code:
# yum list | grep lapack
lapack.i586                           3.2.1-3.fc11                updates
lapack-devel.i586                     3.2.1-3.fc11                updates
scalapack.i586                        1.7.5-5.fc11                fedora
scalapack-devel.i586                  1.7.5-5.fc11                fedora
 
Old 10-06-2009, 04:44 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
May be
Code:
#include <lapackpp/lapackpp.h>
int main() {

return 0;
}
#include <lapackpp/lapackpp.h> .. means a system location.
#include "lapackpp/lapackpp.h" .. same directory as the code.

But definitely ...
g++ example.cpp -I /usr/local/include/lapackpp/
.. which will create ' a.out '.
.....
 
Old 10-07-2009, 10:10 PM   #4
vielmaj
LQ Newbie
 
Registered: Jun 2009
Posts: 24

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Other Lapack++ problem

I did get the code to compile when I ran the following program

//////////////////////////////////////////////////////////////
//g++-4.3 test.cpp -I /usr/local/include/lapackpp
#include <lapackpp/lapackpp.h>

int main() {

LaGenMatDouble A();
return 0;
}
//////////////////////////////////////////////////////////////

But when I run the following program,

//g++-4.3 test.cpp -I /usr/local/include/lapackpp
#include <lapackpp/lapackpp.h>

int main() {

LaGenMatDouble A(5,5);
return 0;
}

/////////////////////////////////////////////////////////////

I get the following error.

$ g++-4.3 test.cpp -I /usr/local/include/lapackpp /tmp/ccgUstyh.o: In function `main':
test.cpp:(.text+0x85): undefined reference to LaGenMatDouble::LaGenMatDouble(int, int)'
test.cpp:(.text+0x95): undefined reference to `LaGenMatDouble::~LaGenMatDouble()'
collect2: ld returned 1 exit status

Here is the web location of the class I am trying to use.
http://lapackpp.sourceforge.net/html...MatDouble.html

I guess I need a little more help.
Thanks,

Jason
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to compile a c++ code in vi? nehapawar Linux - Newbie 4 08-12-2009 10:16 AM
How to link gfortran compiled code with lapack and arpack libraries A.V. Linux - Software 1 07-03-2009 08:40 AM
compile C code in G++ lucky6969b Programming 25 01-04-2006 08:51 PM
I can't compile c++ code with g++ malb Programming 5 07-25-2005 06:54 PM
how i compile a source code? nazib Linux - General 5 02-27-2005 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration