Compiling lapack++ for 64 bit Windows
How to build lapack++ for 64 bit Windows using Visual Studio 2008
- Point your browser to http://developer.amd.com/cpu/Libraries/acml/downloads/pages/default.aspx and in the downloads section under the PGI tab, download acml4.3.0-win64.exe. You will need to register a free account if you have not already done that.
- Run the downloaded file to install the library. Please note the installation path.
- Point your browser to http://sourceforge.net/project/showfiles.php?group_id=99696 and download lapackpp-2.5.3.tar.gz which is the latest available release.
- Unpack the above file somewhere. You may need a utility to unpack .tar.gz files on Windows, like 7-zip or WinRAR.
- In the lapackpp folder you created above, find lapackpp.sln and open it using Visual Studio. This may be done with a double click on the file.
- Visual Studio will complain that the file should be upgraded. Click Next twice, Finish and finally Close. You should see a conversion report and the solution Explorer.
- From Build menu, choose Configuration Manager. From Active solution platform, choose New. In the next dialog, choose x64 as the new platform and Win32 as the source for copying the settings from. Make sure the Create new project platforms is checked. Click OK and then close the Configuration Manager.
- In the Solution Explorer, right click on lapackpp (should be in bold now), and choose Properties. Under Configuration Properties > Linker > Input, choose Additional Dependencies and click the (...) button. In the opened dialog box, delete liblapack32.lib and libblas32.lib and add libacml_dll.lib and libacml_mv_dll.lib or libacml_mp_dll.lib and libacml_mv_dll.lib if you prefer to use multi-threaded version of ACML. Please note! The side effects of using _mp version is not yet investigated. Click OK. Under Configuration Properties > Linker > General, choose Additional Library Directories and insert the path of the aforementioned libraries, like C:\AMD\acml4.3.0\win64\lib and click OK to close the Properties dialog box.
- From Build menu, choose Rebuild, and if you have done everything right, you should get a success message. This is only for the debug version. Unfortunatly, due to (mis)behavior of Visual Studio, when you create new platforms, the settings in Release versions are cleared and if you try re-building it, you will get a non-sense message like There is no rebuild command line to execute. Jump to the next step if you need a Release version of the library.
- In the Solution Explorer, right click on lapackpp (should be in bold), and choose Properties. Under Configuration Properties > General notice that the Configuration Type is set to Makefile which is wrong. Change it to Dynamic Library (.dll) and press Apply button. Now, set the options you already set for the linker in step 8. You will need to set some more options like Configuration Properties > C/C++ > General > Additional Include Directories to include and Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions to WIN32;OS_WIN32;BUILDING_LAPACK_DLL;LA_COMPLEX_SUPPORT in addition to all optimization settings you prefer. If you have done all of that correctly, a Build > Rebuild command should give you a success message. You will find the compiled .LIB and .DLL files in the lapackpp folder under x64\Debug or x64\Release directory.
- If you want, you may build the test programs by fixing appropriate options.
You will need the .DLL file (lapackpp.dll) and appropriate .DLL files from ACML (libacml_dll.dll and libacml_mv_dll.dll or libacml_mp_dll.dll and libacml_mv_dll.dll in case of using _mp version) when running your final application. They must be present in the program's directory (preffered), PATH environment variable or Windows / Windows\System32 directory. This is also the case for PGI compiler runtime .DLL files present along with aforementioned files. You may download a pre-compiled version here: Media:Lapack++_x64.zip. You will need to download ACML library yourself.