QuantLib building error - c++

I am trying to build QuantLib but, when running the build process, it returns with 18 succesfull and 1 failed (out of 19 projects in the solution). The one that fails should be testsuite. I am building a x64 release according to its website instruction. I have tried to build a Win32 but it is still the same.
I cannot attach output because it is too big, but I can link the output txt file here.
My boost version is 1.59 and it is working. I have tested it with several different codes and it compiles without any trouble.
I use Microsoft Visual Studio 2015 Community Edition.
Thank you very much!

https://github.com/lballabio/quantlib/pull/292/files?diff=split
This definitively fix the issue. It is an already known bug.

Related

LNK1103 when linking ODBCCP32.lib using Visual C++ 2017 targetting XP (v141_xp) in debug mode

When attempting to upgrade a program that was originally built in Visual Studio 2010 to target 2017, I am getting LNK1103 errors when linking odbccp32.lib indicating:
debugging information corrupt; recompile module
I have included legacy_stdio_definitions.lib, which seems to be required to resolve symbol issues with legacy static libraries, but I still get the error about debug information.
Release builds work fine.
It turns out that this is actually a compiler problem with certain versions of Visual Studio 2017. Versions 15.3 and 15.4 have this problem, and short of linking in non-debug mode, I was unable to find a good solution in these compiler versions.
I did, however, find a Developer Community thread detailing this issue, which apparently affects a number of legacy libraries when linking using Visual Studio 2017 versions 15.3.x and 15.4.x.
According to MSFT staff in that thread, the problem is resolved in 15.5. From the thread linked above:
YongKang Zhu [MSFT] ยท Oct 04 at 11:08 AM
Thanks for the report. The problem has been fixed in VS 2017 Update 5.
I was able to confirm this is the case by installing the current 15.5 preview version and successfully linking the library.
I added this question and answer because existing search information on this topic seems extremely poor.

Building OpenCV 3.0.0's DLLs for Visual Studio 2015 with Cmake

Following the instructions here:
docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
I setup an OpenCV project in VS 2015 Community and used the pre-built libraries. It works until I get this message:
"MSVCP120D.dll is missing from your computer"
From doing some searching I gathered this means that the pre-build libraries are only supposed to be used with an older version of VS so I figured I'd just compile them myself using this:
docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariablehere
While it appears to compile properly and despite flagging "BUILD_SHARED_LIBS" I can't find any DLL files in the output - just a lot of VS solutions:
imgur.com/JdSc5CH
Would someone be able to give me some advice on how to generate the DLLs?
thanks!
I'm a beginner at this stuff. I've since learned a lot about Visual Studio, about CMake and about OpenCV. Got it all working now, took me a day or two.
It turns out you have to compile the openCV library from git repository in order to be compatible with Visual Studio (VS14) 2015. As of this date, no go on pre-compiled version supporting VS14.
I've organized what I've learned, placed it online here in case anybody else has the same frustrations. Its pretty detailed, too much content to post here.
VS2015 uses MSVCP140.dll, I think your error message is about a redistributable package of VS2013.
And try BUILD_SHARED_LIBS as on/off.

Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'

I am building MFC application which uses other c++ library.I am using vs 2008 and compiled all the library project in vs 2008.
It is compiling well in debug mode but failed to run in Debug Unicode mode,Release,Release Unicode mode.
I found in the net that VS 2008SP1 is required to be installed but how come it is compiling in debug mode.
Please suggest how to overcome this problem.
If compiling a solution with multiple projects you should compile all projects with the same compiler (version) to be sure it works.
I once got the same error message like you. If I remember correctly the problem occured because link time code generation was used. My solution was to rebuild all, another solution might have been disabling link time code generation.
In Microsoft terminology, P1 is the parser (front-end), and P2 is the code generator (back-end). With link-time code generation (LTGC) enabled, the result of P1 is stored in a file and P2 is performed later at link time.
If you downgraded your compiler, you should do a full rebuild, otherwise the link step will try to use the incompatible P1 output, which will trigger that error.
If you upgraded the compiler, Visual Studio automatically does a full rebuild, so this should never happen (if it does anyway, just perform a full rebuild).
I had this problem just with other numbers as well using Visual studio 2015.
The problem was in one of the libraries that I linked to my project was build using VS2015 Update 3. The solution that worked for me - update Visual Studio to 2015 Update 3.
In my case, I just installed Microsoft Visual Studio 2008 Service Pack 1 (Installer) which resolved the problem. Service Pack can be downloaded from following link:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=10986

Visual C++ 2010 Express: How to use with Qt?

I'm confused about getting Qt working with Visual Studio Express. Most of the searches online have turned up instructions for compiling Qt using instructions such as:
Install MSVC2005 or MSVC2008
Install the most recent Platform SDK (# MSDN: "Platform SDK for Windows
Server 2003 R2")
From the Platform SDK, you'll need to install at least the base +
internet options
Then, download and extract a recent snapshot or the preview release to
D:\Qt\4.x.x
Open up a console with the MSVC settings loaded (see MSVC Tools-menu)
and go to your Qt directory
Type "configure -platform win32-msvc2005" without the quotation
marks
That will build you the project files you'll need
After that, it's as simple as running "nmake" and drinking a lot of
coffee
Then, add D:\Qt\4.x.x\bin and
D:\Qt\4.x.x\lib to your path
environment variable, and you'll be
able to use this version of Qt from
everywhere on your system. The latter
could be added to the library section
in the options from MSVC as well.
(from http://www.qtcentre.org/threads/11710-Visual-Studio-2005-Express)
However, when I go to the download page of Qt (http://qt.nokia.com/downloads), there is a download for Visual Studio labeled:
"Qt libraries 4.7.1 for Windows (VS 2008, 228 MB)"
I'm confused, do I actually still need to build it? Or is it already built?
Using the downloadable exe from qt (http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.1-vs2008.exe) does not seem to work with Visual Studio 2010. I tried building a simple hello world program from the command line which would not run. I'll repeat my comment from a previous answer.
I tried the hello world example from
doc.qt.nokia.com/4.7/gettingstartedqt.html.
I was able to build the project and an
exe is generated. However, the exe
fails to run and generates a system
error dialog box about "side-by-side
configuration is incorrect...". I ran
SxsTrace and it says:
...
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\ 9.0.21022.8__...\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86", publicKeyToken="...",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.
To me, it looks like its trying to use
VS2008 (which I don't have). It makes
sense I guess since the download is
for VS2008.
I was in the process of compiling qt 4.7.1 using the instructions in my question (using win32-msvc2010 as my platform target however) as I asked this SO question and the compilation finished. I rebuilt the hello world project and the exe runs. So it seems like the answer is in order to use with Visual Studio Express 2010 you currently do need to compile (at least until Qt releases a VS2010 download option). However, I believe if you are using VS2008 then you will not need to compile.
The Qt binaries provided by Nokia for Windows target either MinGW or Visual Studio 2008, both for compiling 32bit executables. If you need Qt binaries for VS 2005 (32bit), you may find them in their archives.
For everything else, you need to compile Qt yourself. Especially for:
Visual Studio 2008 64 bit
Visual Studio 2008 Express Edition 64 bit: You need the Windows SDK 7.0 which provides the 64 bit compilers and compile Qt with those.
Visual Studio 2010 32 bit and 64 bit
In general, you cannot link libraries compiled with different compilers, i.e. use the Qt binaries built with VC 9.0 (VS 2008) 32 bit and link them to an executable built with VC 10.0 (VS 2010) 32 bit.
Just a small update on this.
Downloading the QTSDK (and using cmake instead of qmake everything looks like working quite well. Except for the fact that the installer of QTSDK didn't update the path for qmake.exe and you've to do by hand.
Tested with QtSDK 4.8 and visual studio express 2010
http://qt.nokia.com/downloads has a link called qt-vs-addin-1.1.7.exe (57 MB)
You'll probably need that one as well . .
I don't think you need to compile the libraries since there is a download for them now . .
So get the 228 MB of libs and 57 MB plugin and you should be set.
DISCLAIMER: I don't use MSVC (yet?) so please let me know if it works.

Compile hunspell with Visual Studio

I need a spellcheck tool for my MS C++ (MFC) project. It looks like hunspell is a good choice. However, I found it difficult to compile with visual studio. Can someone help?
Here is what I have done:
I downloaded hunspell from sourceforge, the version is 1.2.14. Unzipped it.
Created an empty solution in visual studio and added the projects into it. The project files are under win_api directory.
Then I tried to compile it, and got a bunch of errors.
By the way, my operating system Vista (x64).
Please help.
Thanks for the reply.
Today, I tried it on a Windows XP (x86) system and it compiled without errors.
The error message with Vista x64 was: error c2552: non-aggregates cannot be initialized with initializer list. It is for file 'utf_info.cxx'. It's strange that XP x86 works fine.
It seems the version 1.2.12 works fine, for both 32 and 64-bit machines.
This appears to be a known bug.
There's now a patch available, which has been integrated into the CVS as of January 13, 2011. Make sure that you grab the latest copy of the source.