Hi all
I have a problem when I try to build QuantlibXl, ObjectHandler, etc. with the gensrc projects - these fail to autogenerate the code they are supposed to. I am compiling the projects in Visual C++ 2008 Express, but I suspect the problem is related to python, I am using version 3.0.1. Upon build the following output is generated for the ohgensrc project: 1>------ Build started: Project: ohgensrc, Configuration: All Win32 ------ 1>Performing Makefile project actions 1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 1>Copyright (C) Microsoft Corporation. All rights reserved. 1> ..\..\gensrc\gensrc.py -xdlv --oh_dir=.. 1> File "C:\Users\nlassesen\Documents\NoBackup\QuantLib\gensrc\gensrc.py", line 51 1> print USAGE_ERROR % { 'scriptName' : sys.argv[0] } 1> ^ 1>SyntaxError: invalid syntax 1>NMAKE : fatal error U1077: '..\..\gensrc\gensrc.py' : return code '0x1' 1>Stop. 1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions" 1>Build log was saved at "file://c:\Users\nlassesen\Documents\NoBackup\QuantLib\ObjectHandler\gensrc\ build\vc\BuildLog.htm" 1>ohgensrc - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== - and similar for the qlgensrc project. Later projects fail to compile because the autogenerated files are missing. Br, Nicolai ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Nicolai Lassesen <nlassesen <at> deloitte.dk> writes:
> > Hi all > > I have a problem when I try to build QuantlibXl, ObjectHandler, etc. with the > gensrc projects - these fail to autogenerate the code they are supposed to. I > am compiling the projects in Visual C++ 2008 Express, but I suspect the > problem is related to python, I am using version 3.0.1. Does anybody have any comments on this? Has anybody else been able to build with python version 3.0.1? Br, Nicolai ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Nicolai Lassesen
Hi Nicolai, Yes, your problem is related to python, specifically to python version 3.0. The reason is that python is intentionally *not compatible* between versions 2.x and 3.x. For the case of the error message you have, you are tripped up by the change in the "print" functionality: in 2.x print is a statement, in 3.x it is a function. You need to install python 2.x or, if you are ambitious, try running an automatic converter that changes 2.x code into 3.x code. Best, Bojan -- Bojan Nikolic || http://www.bnikolic.co.uk ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Bojan
Thank you for your reply. > Yes, your problem is related to python, specifically to python version > 3.0. The reason is that python is intentionally *not compatible* > between versions 2.x and 3.x. I was not aware of this incompatibility - maybe someone should put a note on the Quantlib site :-) > You need to install python 2.x or, if you are ambitious, try running > an automatic converter that changes 2.x code into 3.x code. I tried editing the python files, altering "print " to "print(...)" and various other stuff, but when the compiler began to complain about the xml files as well I gave up and installed the 2.6.1 version of python - now everything runs and compiles just fine :-) Br, Nicolai ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |