Re: Problem building ObjectHandler

Posted by Don Stewart-3 on
URL: http://quantlib.414.s1.nabble.com/Problem-building-ObjectHandler-tp8266p8270.html

Hi Erik,
I'm build QuantLibXL using Python 2.5.4. I recently had  what looks to be a similar issue to the one you are experiencing.
 
To find out more information about the error you could try:-
At a command prompt, change directory to ObjectHandler\gensrc then run
 
..\..\gensrc\gensrc.py -xdlv --oh_dir=..
 
The resolution I found for my issue was:-
 It turned out that windows association of Python interpreter to .py file association was incorrect. See http://bugs.python.org/issue7936. To determine Python interpreter file association, at the DOS Prompt key in:-

    assoc .py

this displays a string like ".py=py_auto_file". Now type

    ftype py_auto_file

(actually replace py_auto_file with the output from the first command)

This should display something like

    py_auto_file="C:\Program Files\Python25\python.exe" "%1" %*

If %* is missing, then arguments are not passed to the python interpreter.

 
Regards Don Stewart
[hidden email]

From: Erik Schlogl [mailto:[hidden email]]
Sent: 14 May 2010 05:55
To: [hidden email]
Subject: [Quantlib-users] Problem building ObjectHandler

Hi,

 

I’ve followed the instructions for installing ObjectHandler 0.9.7 under Windows, and got to the point where I’ve loaded the Visual C++ Solution into Visual C++ 2008 Express Edition. A build of the solution then fails with the following error:

 

1>------ Build started: Project: ohgensrc, Configuration: All Win32 ------

1>Performing Makefile project actions

1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

1>Copyright (C) Microsoft Corporation.  All rights reserved.

1> ..\..\gensrc\gensrc.py -xdlv --oh_dir=..

1>  File "c:\build_ql_0_9_7\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:\build_ql_0_9_7\ObjectHandler\gensrc\build\vc\BuildLog.htm"

1>ohgensrc - 2 error(s), 0 warning(s)

 

This looks like Python doesn’t understand the gensrc.py script. I have

 

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32

 

If I try to execute gensrc.py from the IDLE Python GUI directly, I get a similar error.

 

I’m no expert on Python, so I don’t have a clue where this problem might be coming from.

 

Can anyone help?

 

Thanks,

Erik

 

UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.

 

 

This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)

25 The North Colonnade,

Canary Wharf,

London

E14 5HS

United Kingdom

Registered as a Limited Company in England and Wales No.1920623.

Registered Office as above

Switchboard: 020 7066 1000

Web Site: http://www.fsa.gov.uk

*****************************************************************

 


------------------------------------------------------------------------------


_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users