Dear Quantlib Users,
I have a problem to compile CallableBonds.sln in x64 environment in debug mode of VS13 and this is a pity.
To make clear, of which solution I am talking: With my QuantLib download a path with examples was included as shown in the screen shot.
Since all projects on this PC are in x64, the QuantLib Libs created here are:
QuantLib-vc120-x64-mt.lib,
QuantLib-vc120-x64-mt-gd.lib,
QuantLib-vc120-x64-mt-s.lib
When I tried to compile the Callable Bonds solution in my 64bit environment in debug mode the linker surprisingly attempts to link to the 32bit QuantLib library:
QuantLib\lib\QuantLib-vc120-mt-gd.lib (which was not generated)
The linker command line clearly shows that all switches to x64 have been set – at least all of which I know:
OUT:".\bin\CallableBonds-vc120-x64-mt-gd.exe" /MANIFEST /NXCOMPAT /PDB:".\bin\CallableBonds-vc120-x64-mt-gd.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "F:\build_ql_1_7_0\QuantLib\lib\QuantLib-vc120-mt-gd.lib" /DEBUG /MACHINE:X64 /PGD:".\bin\CallableBonds-vc120-x64-mt-gd.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:".\build\vc120\x64\Debug\CallableBonds-vc120-x64-mt-gd.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
So what is going wrong? Why is it not linking automatically to the corresponding QuantLib-vc120-x64-mt-gd.lib. Do I have to dispense with “x64” when playing with the “Examples”?
When looking around I recognized an apparent inconsistency in in autolink.hpp, as described in my initial mail to Luigi below.
Thanks for advice, kind regards, Harald
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Samstag, 9. Januar 2016 16:23
To: Harald Hubbes
Subject: Re: FW: problem to compile CallableBonds.sln in x64 environment of VS13
No, it's just that I got caught up in other things.
Anyway: I'm not sure of what you're compiling. There's no CallableBonds.sln in the distribution. Possibly you opened the project and your environment created one? Anyway, if you open the solution provided in the QuantLib release (QuantLib_vc12.sln) you can switch to the x64 target and compile all the included projects, including CallableBonds. Let me know how it goes.
Luigi
P.S. If there are other problems, please write to the mailing list. It doesn't make a difference to me, but it increases the chances that someone else can step in and give you an answer earlier than I can (especially when you consider that I develop mainly on Linux).
On Sat, Jan 9, 2016 at 11:17 AM Harald Hubbes <[hidden email]> wrote:
Dear Luigi,
I wonder whether my question is too trivial or whether the solution needs some more fundamental changes and needs time to solve.
I probably will abandon the idea to work in x64 and build a quantlib Lib in 32 bit.
For some feedback I would be very grateful, kind regards, Harald
From: Harald Hubbes [mailto:[hidden email]]
Sent: Donnerstag, 7. Januar 2016 18:54
To: Luigi Ballabio
Subject: problem to compile CallableBonds.sln in x64 environment of VS13
Dear Luigi,
I have a problem to compile CallableBonds.sln in my x64 environment of VS13.
My quantLib libraries are:
QuantLib-vc120-x64-mt.lib, QuantLib-vc120-x64-mt-gd.lib, QuantLib-vc120-x64-mt-s.lib
These libraries have successfully been used to compile QuantLibXL-vc120-x64-mt-s-1_7_0.xll, from which I conclude that my basic set up is alright.
I now want to inquire about quantlib and accordingly tried to compile the Callable Bonds solution in my 64bit environment in debug mode but the linker failed to find – to no surprise -the not requested 32bit quantlib library: QuantLib\lib\QuantLib-vc120-mt-gd.lib,
which clearly does not exist in my environment.
Already the linker command line:
OUT:".\bin\CallableBonds-vc120-x64-mt-gd.exe" /MANIFEST /NXCOMPAT /PDB:".\bin\CallableBonds-vc120-x64-mt-gd.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "F:\build_ql_1_7_0\QuantLib\lib\QuantLib-vc120-mt-gd.lib" /DEBUG /MACHINE:X64 /PGD:".\bin\CallableBonds-vc120-x64-mt-gd.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:".\build\vc120\x64\Debug\CallableBonds-vc120-x64-mt-gd.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
indicates, that it attempts to link to the wrong lib. I turned all switches I know of to x64, etc.. Is there any switch in VS13, which needs to be set, and is specific to the quantlib environment?
Now, being a bit frustrated, I have been looking around, and found in autolink.hpp a - to my opinion – inconsistency (all #defines are properly highlighted):
#define QL_LIB_TOOLSET "vc120"
#define QL_LIB_PLATFORM "-x64"
#define QL_LIB_THREAD_OPT "-mt"
#define QL_LIB_RT_OPT "-sgd" <-
This apparently makes in
#define QL_LIB_NAME "QuantLib-" QL_LIB_TOOLSET QL_LIB_PLATFORM QL_LIB_THREAD_OPT QL_LIB_RT_OPT ".lib"
a lib named QuantLib-vc120-x64-mt-sgd.lib and not QuantLib-vc120-x64-mt-gd.lib.
QuantLib-vc120-x64-mt-gd.lib is obtained when QuantLib_vc12.sln is compiled in debug mode.
Apparently autolink.hpp does not have an effect, since the linker is also not looking for \QuantLib-vc120-mt-sgd.lib.
What do you think I need to do to compile the Callable Bond solution in x64?
Kind Regards, Harald
Dr Harald Hubbes, MBA
Leyendecker Str 4-i
50825 Köln
Tel +49(0)221 800 151 09
e-mail [hidden email]
--
Free forum by Nabble | Disable Popup Ads | Edit this page |