Closed igitur closed 6 years ago
i merged this to my v1.11.x branch - many thanks! however i have also created a single set of project files which are (i hope) compatible with all versions of visual studio >= VC10, like luigi did for QuantLib. i am not planning on shipping the version-specific project files with the release.
On second thought I think I will release the project files that are specific to VS versions 8 to 14, and also the project files with no version number, i have tested these under VS 2017 (14.1) and I hope that they work for all versions of VS from 10 up.
I remember I did this PR in preparation for another, larger PR (with an actual code change)... but no I can't remember what that change was. I'll have to relook at what I wanted to do. I just remember I wanted to do the change in VC14.
Sidenote, what's happening on the reposit branch? Anything we can do to help?
OK, I look forward to the further contribution, many thanks.
I'm moving forward again on the reposit branch. The platform has been stable for a while, now porting the 1,114 functions from the old build to the new. 771 done, 343 to go. Once that's done I will do a beta 1.11 release of the new build.
What can I do to help with porting over the functions?
Oh wow. That is very kind of you to offer and i would be grateful for some help.
Here are the steps that you would need to take:
Clone my repo of the old build, and build it:
Clone my repo of the new build, and build it. Here is the documentation for that:
http://quantlib.org/reposit/docs/latest/build_git_swig_windows.html
The file QuantLibXL_full_vc9.sln is obsolete, instead I am using QuantLibXL_full.sln with VS 2017. log4cxx is no longer part of the build.
The migration consists of copying from:
QuantLibAddin-Old/QuantLibAddin/gensrc/metadata/functions/xxx.xml
to:
QuantLibAddin/swig/functions/xxx.i
Create a unit test. Copy one of the existing unit tests to create:
QuantLibXL/UnitTests/Tests/xxx.xlsx
Modify the following files to reflect your environment:
QuantLibXL/UnitTests/UnitTests.old.bat QuantLibXL/UnitTests/UnitTests.new.bat
Invoke UnitTests.old.bat to bring up the unit test environment for the old XLL.
Hit Alt-F11 to bring up VBA, then edit module RunNew, function setActualValues(), and tell it to load only xxx.xlsx. (The name RunNew is wrong, the function is used for the old XLL too).
Open xxx.xlsx and set it up to call every function in xxx.xml.
Hit Ctrl-Shift-M to bring up the unit test menu, and click "Capture Expected Values in Active Book". Save and close xxx.xlsx.
Hit Ctrl-Shift-M to bring up the unit test menu, and click "Run All Unit Tests". Because of the change that you made above to the VBA code, this should run only your new test. It should pass 100% since at the moment you're testing the old XLL against itself. Hit Ctrl-Shift-X to close Excel.
Copy all of the functions from xxx.xml to xxx.i. The syntax for the reposit SWIG module is documented here:
That document is really out of date, sorry about that. Copy required features from the existing .i files - %loop, %alias, etc.
Run the SWIG module and build the new XLL again.
Invoke UnitTests.new.bat to bring up the unit test environment for the new XLL.
Hit Ctrl-Shift-M to bring up the unit test menu, and click "Run All Unit Tests". Now you are testing the new XLL against the expected results generated by the old XLL.
Do a git commit and send me a pull request!
I am currently working my way through the marketmodel functions. So to start please choose any xxx.xml file that has not yet been converted to xxx.i, apart from the marketmodel ones. I suggest you start with a small file whose functions do not depend on other functions from another file.
Many thanks again for offering to help.
every time you implement a new constructor, you have to add a new call to macro QL_OBJECT_WRAPPER() in file apply.i.
Thanks, Eric. Looking at this only now. I got most of this working, and had to make some adjustments to get it building in VS2017. I will document these changes all later.
What I got stuck on was that the .cpp and .hpp files seem to be missing from the .\QuantLibAddin\AddinCpp\ project. I can't find them anywhere in the repo either. Did you forget to commit them or am I missing something else?
many thanks for taking a look!
are you trying to run AddinCpp in the old build, or in the new build?
1) new build. the C++ addin is way out of date. the only project that is currently usable is QuantLibXL_full.sln, this works for me under VS 2017.
2) old build. autogenerated source files are included in releases but are not put under version control. you need to edit this file...
QuantLibAddin/gensrc/Makefile.vc
...and pass the -p flag to gensrc.
however if you are using the old build only for purposes of migrating to the new build then there would be no point in looking at the C++ addin since that's not yet supported in the new build anyway.
The toolset selection in the
auto_link.hpp
files are now also in line with theQuantLib
ones.