Boost logo

Ublas :

Subject: Re: [ublas] Issue with boost numeric bindings and lapack
From: Franglez (fgonzalez_at_[hidden])
Date: 2011-01-13 09:48:52


Hi, Simon

How have you defined the .def file to generate the .lib file for clapack?

It should include some lines like the following ones

dgesvd=dgesvd_
dgesvd_=dgesvd_
_dgesvd=dgesvd_

Best,

Fran

On 12/01/2011 11:51 AM, Simon Mpasi wrote:
>
> Hello ublas users,
>
> I am having problems getting lapack routines to work.
>
> I am using Microsoft Visual Studio 2010 (VC9) on Windows XP. I
> installed boost_1_44 and the latest version of boost numeric bindings
> from boost sandbox.
>
> I have no Fortran compiler, thus I need to use clapack.
>
> The error message LNK2019 (in red below) when trying to link
> complains about an unresolved external symbol _/dgesv/_. This is due
> to the fact that the
>
> routines in the lapack library have an underscore at the end and not
> at the front and back, i.e. dgesv_ and not _/dgesv/_.
>
> I looked at fortran.h and lapack_names.h. The problem may be with
> the macro Fortan_ID (id) but I don't know how to fix it. Defining the
> symbol
>
> BIND_FORTRAN_LOWERCASE or undefining it does not solve the problem.
>
> Also, I wonder if generate_functions.hpp is where the offending
> underscore in front is coming from.
>
> Thank you very much for all your help and assistance.
>
> Simon Mpasi
>
> >------ Rebuild All started: Project: testNumericBindings,
> Configuration: Debug Win32 ------
>
> 1>Deleting intermediate and output files for project
> 'testNumericBindings', configuration 'Debug|Win32'
>
> 1>Compiling...
>
> 1>ublas_gesvd3.cc
>
> 1>using native typeof
>
> 1>c:\program
> files\boost\boost_1_44\boost\numeric\ublas\storage.hpp(94) : warning
> C4996: 'std::uninitialized_copy': Function call with parameters that
> may be unsafe - this call relies on the caller to check that the
> passed values are correct. To disable this warning, use
> -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
> 'Checked Iterators'
>
> 1> c:\program files\microsoft visual studio
> 9.0\vc\include\memory(98) : see declaration of 'std::uninitialized_copy'
>
> 1> c:\program
> files\boost\boost_1_44\boost\numeric\ublas\storage.hpp(89) : while
> compiling class template member function
> 'boost::numeric::ublas::unbounded_array<T>::unbounded_array(const
> boost::numeric::ublas::unbounded_array<T> &)'
>
> 1> with
>
> 1> [
>
> 1> T=real_t
>
> 1> ]
>
> 1> c:\program
> files\boost\boost_1_44\boost\numeric\ublas\matrix.hpp(100) : see
> reference to class template instantiation
> 'boost::numeric::ublas::unbounded_array<T>' being compiled
>
> 1> with
>
> 1> [
>
> 1> T=real_t
>
> 1> ]
>
> 1> c:\documents and settings\smpasi\my documents\visual studio
> 2008\projects\testnumericbindings\testnumericbindings\ublas_gesvd3.cc(31)
> : see reference to class template instantiation
> 'boost::numeric::ublas::matrix<T,L>' being compiled
>
> 1> with
>
> 1> [
>
> 1> T=real_t,
>
> 1> L=boost::numeric::ublas::column_major
>
> 1> ]
>
> 1>Linking...
>
> 1> Creating library C:\Documents and Settings\smpasi\My
> Documents\Visual Studio
> 2008\Projects\testNumericBindings\Debug\testNumericBindings.lib and
> object C:\Documents and Settings\smpasi\My Documents\Visual Studio
> 2008\Projects\testNumericBindings\Debug\testNumericBindings.exp
>
> 1>ublas_gesvd3.obj : error LNK2019: unresolved external symbol
> _dgesvd_ referenced in function "int __cdecl
> boost::numeric::bindings::lapack::detail::gesvd(char,char,int,int,double
> *,int,double *,double *,int,double *,int,double *,int)"
> (?gesvd_at_detail@lapack_at_bindings@numeric_at_boost@@YAHDDHHPANH00H0H0H_at_Z)
>
> 1>C:\Documents and Settings\smpasi\My Documents\Visual Studio
> 2008\Projects\testNumericBindings\Debug\testNumericBindings.exe :
> fatal error LNK1120: 1 unresolved externals
>
> 1>Build log was saved at "file://c:\Documents and Settings\smpasi\My
> Documents\Visual Studio
> 2008\Projects\testNumericBindings\testNumericBindings\Debug\BuildLog.htm
> <file:///c:%5CDocuments%20and%20Settings%5Csmpasi%5CMy%20Documents%5CVisual%20Studio%202008%5CProjects%5CtestNumericBindings%5CtestNumericBindings%5CDebug%5CBuildLog.htm>"
>
> 1>testNumericBindings - 2 error(s), 1 warning(s)
>
> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: fgonzalez_at_[hidden]