|
Ublas : |
Subject: Re: [ublas] Linker error
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-12-15 08:02:40
Mehran Ziadloo wrote:
> 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.
I don't even have a g95 on my windows. I only have a g77 (gcc 3.2) and a gfortran-4 (gcc 4.3.2). And I'm currently not planning on experimenting to link their output with VC++ projects.
> > 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.
It was just a guess.
> 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 have no experience with this. But I'm also not sure how your problems relate to moddlaed7. You could try to comment out your code that uses moddlaed7, and see whether your projects links without errors if you doesn't have to link against a library generated with g95.
> 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 have no idea either. I would expect debug libraries to use the compile option -g and release libraries to use compile options similar to -DNDEBUG -O3.
> 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.
I'm just trying to back out. I already offered my guesswork, and it seems I can't help you any further. I wish you good luck with your remaining problems. It will certainly be interesting to hear how you will finally solve these.
Regards,
Thomas