Page 1 of 1

Using CLAPACK with Visual Studio 2008

PostPosted: Thu Aug 26, 2010 4:10 pm
by daonham
Hello all,

I'm new to C++ and CLAPACK, and I follow the procedure to install CLAPACK as describe bellow:
http://icl.cs.utk.edu/lapack-for-window ... index.html

I then download the file "CLAPACK-EXAMPLE Visual Studio project", and build and run. Everything works fine so far. I run into problem when I:

1. create a new project from Visual Studio and use the exact code as provided in "CLAPACK-EXAMPLE Visual Studio project", except now the extension is .cpp instead of .c, I tried changed it to .c but it still doesn't work. I tried declare extern "C" to no avail. The error I got when tried to build is:
Error 1 error LNK2019: unresolved external symbol _dgesv_ referenced in function _main main.obj test
Error 2 fatal error LNK1120: 1 unresolved externals C:\Works\Softwares\CLAPACK\CLAPACK-EXAMPLE\test\Debug\test.exe 1 test

2. I also got a problem when I try to add "#include <iostream>" into the existing project from "CLAPACK-EXAMPLE Visual Studio project". There are 102 errors; a fist few are:
Error 1 error C2143: syntax error : missing '{' before ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 39 CLAPACK-EXAMPLE
Error 2 error C2059: syntax error : ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 39 CLAPACK-EXAMPLE
Error 3 error C2143: syntax error : missing '{' before ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 41 CLAPACK-EXAMPLE
Error 4 error C2059: syntax error : ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 41 CLAPACK-EXAMPLE
Error 5 error C2143: syntax error : missing '{' before ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 41 CLAPACK-EXAMPLE
Error 6 error C2059: syntax error : ':' c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 41 CLAPACK-EXAMPLE

Please help. Thank you in advance.

Thien

Re: Using CLAPACK with Visual Studio 2008

PostPosted: Mon Jan 03, 2011 7:31 pm
by Numsgil
I had this issue, too. I'm pretty sure the issue is that you have to use the Intel Compiler for Windows (ie: NOT the default C++ compiler that comes with Visual Studio).

Using CLAPACK with Visual Studio 2005

PostPosted: Tue Aug 23, 2011 2:02 pm
by Elie Amani
a

Re: Using CLAPACK with Visual Studio 2008

PostPosted: Mon Oct 24, 2011 10:16 am
by wwnigel
Hi Numsgil, I also met this problem.

Can you tell me how to change to the compiler from the default one to intel compiler in visual studio? Thanks...

Numsgil wrote:I had this issue, too. I'm pretty sure the issue is that you have to use the Intel Compiler for Windows (ie: NOT the default C++ compiler that comes with Visual Studio).