Boost logo

Ublas :

Subject: Re: [ublas] Linker error
From: Mehran Ziadloo (mehran20_at_[hidden])
Date: 2008-12-15 07:13:48


Thomas wrote:
 
> I guess it wasn't Fortran, but an f2c'ed version of dlaed7, with additional
> modifications written in C. moddlaed7 wouldn't even be a legal Fortran
> function name, because it has more than 6 characters.
> And you wouldn't be able to compile Fortran with VC++9.0.
 
Since I'm absolutely new to Fortran, I can't make sure what type of code it was. But I can make you sure that I compiled it with g95 and not with VC++9.0. I forgot to mention it before, sorry.
 
> Maybe the linker option /NODEFAULTLIB:LIBCMTD wasn't such a good idea after
> all.
 
I respectfully disagree. It was necessary, as I tested it, it gives lots of linker error without it.
 
> Debug and release link against different libraries. Often, the debug
> libraries have a 'd' at the end. So "/NODEFAULTLIB:LIBCMTD" refers to the
> debug library and "/NODEFAULTLIB:LIBCMT" refers to the corresponding release
> library. And it's quite easy to end up with inconsistent build options for
> debug and release in visual studio, if one doesn't pay extreme caution to
> avoid this (or uses build systems like cmake or boost-build to avoid this
> sort of trouble).
>
> So instead of linking your release build against
>
> BLASd_nowrap.lib
> libf2cd.lib
> clapackd_nowrap.lib
>
> you should link it against
>
> BLAS_nowrap.lib
> libf2c.lib
> clapack_nowrap.lib
 
I'm aware of linking different version of libraries for debug and release, as you explained and that's exactly what I've done. I've used LIBCMT and all the libraries without 'd' for release mode. But as I told before that link error still remains. The only thing I'm not sure if I've done properly is compiling the Fortran codes. I mean is there debug version and release version for Fortran libraries? When I compiled Fortran codes, I was able to create only one version of libraries and since I didn't know whether it's debug or release (if there is any debug or release for Fortran libraries) I linked the same Fortran library file with my program in debug and release modes. Other than that I'm almost sure that there's nothing wrong with my code.
 
Regards,
Mehran Ziadloo

 
_________________________________________________________________
Imagine a life without walls.  See the possibilities.
http://clk.atdmt.com/UKM/go/122465943/direct/01/