Having trouble building QuantLib-SWIG python

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Having trouble building QuantLib-SWIG python

CptanPanic
I am trying to build QuantLib for python on Win 8.1.  I downloaded VS2013 express, and built QuantLib 1.4 and boost.  Now onto the Python SWIG stuff.  I am using Anaconda python distro, which runs with Python 2.7.7.   I set the environment variables, but I get the following errors.


>SET VS90COMNTOOLS=%VS120COMNTOOLS%

> c:\finance\quantlib-master\QuantLib-SWIG\Python>python setup.py build --compiler=msvc


running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
running build_ext
building 'QuantLib._QuantLib' extension
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "C:\Users\brian\Anaconda\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Users\brian\Anaconda\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line 496, in build_extension
    depends=ext.depends)
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include', u'lib']



c:\finance\quantlib-master\QuantLib-SWIG\Python>
c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %LIB%
C:\finance\boost_1_56_0\lib64-msvc-12.0;C:\finance\QuantLib-1.4\lib

c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %QL_DIR%
C:\finance\QuantLib-1.4\

c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %INCLUDE%
C:\finance\boost_1_56_0
 
Reply | Threaded
Open this post in threaded view
|

答复: Having trouble building QuantLib-SWIG python

cheng li
Hi,

Setup tools are looking for VC9 environment variables. Since you have only
installed VS 2013, the search won't success.

You can do the trick to cheat setup by create an environment variable named
VS90COMNTOOLS and with value the location of your VS2013 setup, e.g. on my
machine:

Name:  VS90COMNTOOLS
Value:   D:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

And then compiler won't complain anymore.

Regards,
Cheng

-----邮件原件-----
发件人: CptanPanic [mailto:[hidden email]]
发送时间: 2014年9月12日 9:23
收件人: [hidden email]
主题: [Quantlib-users] Having trouble building QuantLib-SWIG python

I am trying to build QuantLib for python on Win 8.1.  I downloaded VS2013
express, and built QuantLib 1.4 and boost.  Now onto the Python SWIG stuff.
I am using Anaconda python distro, which runs with Python 2.7.7.   I set the
environment variables, but I get the following errors.


>SET VS90COMNTOOLS=%VS120COMNTOOLS%

> c:\finance\quantlib-master\QuantLib-SWIG\Python>python setup.py build
> --compiler=msvc


running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found file
QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found running
build_ext building 'QuantLib._QuantLib' extension Traceback (most recent
call last):
  File "setup.py", line 239, in <module>
    'build_ext': my_build_ext
  File "C:\Users\brian\Anaconda\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 953, in
run_commands
    self.run_command(cmd)
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 972, in
run_command
    cmd_obj.run()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build.py", line 127,
in run
    self.run_command(cmd_name)
  File "C:\Users\brian\Anaconda\lib\distutils\cmd.py", line 326, in
run_command
    self.distribution.run_command(command)
  File "C:\Users\brian\Anaconda\lib\distutils\dist.py", line 972, in
run_command
    cmd_obj.run()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line
337, in run
    self.build_extensions()
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line
446, in build_extensions
    self.build_extension(ext)
  File "C:\Users\brian\Anaconda\lib\distutils\command\build_ext.py", line
496, in build_extension
    depends=ext.depends)
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 473,
in compile
    self.initialize()
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 383,
in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Users\brian\Anaconda\lib\distutils\msvc9compiler.py", line 299,
in query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include', u'lib']



c:\finance\quantlib-master\QuantLib-SWIG\Python>
c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %LIB%
C:\finance\boost_1_56_0\lib64-msvc-12.0;C:\finance\QuantLib-1.4\lib

c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %QL_DIR%
C:\finance\QuantLib-1.4\

c:\finance\quantlib-master\QuantLib-SWIG\Python>echo %INCLUDE%
C:\finance\boost_1_56_0
 



--
View this message in context:
http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-py
thon-tp15851.html
Sent from the quantlib-users mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce Perforce version control.
Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

CptanPanic
Thanks for your reply,

Unfortunately I have already set that variable.  Without setting this I get the error about not finding vcvarsall.bat, so I have gotten past that problem.  Any other ideas?

cheng li wrote
Hi,

Setup tools are looking for VC9 environment variables. Since you have only
installed VS 2013, the search won't success.

You can do the trick to cheat setup by create an environment variable named
VS90COMNTOOLS and with value the location of your VS2013 setup, e.g. on my
machine:

Name:  VS90COMNTOOLS
Value:   D:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

And then compiler won't complain anymore.

Regards,
Cheng
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

CptanPanic
So I made some progress.  I put in some debug into the msvc9compiler.py file, and it turns out it was not finding the LIBPATH variable that vcvarsall.bat was putting out.  So I added it manually to my environment and it gets past that.  The next error is actually harder for me to understand.  It is complaining it cannot open 'QuantLib/quantlib_wrap.cpp' which I do not even see in either the standard Quantlib code, or the SWIG/Python code.  So what do I need to do here?
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

cheng li
Have you run python setup.py wrap before Python setup.py build?

发自我的 iPad

> 在 2014年9月13日,6:54,CptanPanic <[hidden email]> 写道:
>
> So I made some progress.  I put in some debug into the msvc9compiler.py file,
> and it turns out it was not finding the LIBPATH variable that vcvarsall.bat
> was putting out.  So I added it manually to my environment and it gets past
> that.  The next error is actually harder for me to understand.  It is
> complaining it cannot open 'QuantLib/quantlib_wrap.cpp' which I do not even
> see in either the standard Quantlib code, or the SWIG/Python code.  So what
> do I need to do here?
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p15859.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

Luigi Ballabio

As Cheng said. Otherwise, you can use the released 1.4 tarball, which includes the generated files.

Luigi

On Sep 13, 2014 4:29 AM, "Cheng Li" <[hidden email]> wrote:
Have you run python setup.py wrap before Python setup.py build?

发自我的 iPad

> 在 2014年9月13日,6:54,CptanPanic <[hidden email]> 写道:
>
> So I made some progress.  I put in some debug into the msvc9compiler.py file,
> and it turns out it was not finding the LIBPATH variable that vcvarsall.bat
> was putting out.  So I added it manually to my environment and it gets past
> that.  The next error is actually harder for me to understand.  It is
> complaining it cannot open 'QuantLib/quantlib_wrap.cpp' which I do not even
> see in either the standard Quantlib code, or the SWIG/Python code.  So what
> do I need to do here?
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p15859.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

ohmeninea
I have this same issue--But I have VS2008 installed, along with the Visual
C++ for Python, so I typically don't have an issue when running setup.py
build, except with this project...

My VS90COMNTOOLS is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Error:

c:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
running build_ext
building 'QuantLib._QuantLib' extension
Traceback (most recent call last):
  File "setup.py", line 240, in <module>
    'build_ext': my_build_ext
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in
build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in
build_extension
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in
query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include']



--
View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16409.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

Luigi Ballabio
Are you building from a release or from a git checkout?

Luigi

On Fri, Mar 27, 2015 at 12:09 AM, ohmeninea <[hidden email]> wrote:
I have this same issue--But I have VS2008 installed, along with the Visual
C++ for Python, so I typically don't have an issue when running setup.py
build, except with this project...

My VS90COMNTOOLS is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Error:

c:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
running build_ext
building 'QuantLib._QuantLib' extension
Traceback (most recent call last):
  File "setup.py", line 240, in <module>
    'build_ext': my_build_ext
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in
build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in
build_extension
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in
query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include']



--
View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16409.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

Didrik Pinte-5
In reply to this post by ohmeninea


On 27 March 2015 at 00:09, ohmeninea <[hidden email]> wrote:
I have this same issue--But I have VS2008 installed, along with the Visual
C++ for Python, so I typically don't have an issue when running setup.py
build, except with this project...

My VS90COMNTOOLS is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Error:

c:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
running build_ext
building 'QuantLib._QuantLib' extension
Traceback (most recent call last):
  File "setup.py", line 240, in <module>
    'build_ext': my_build_ext
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in
build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in
build_extension
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in
query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include']

This means the VS environment variables haven't been initialized properly. You should kick off the build from the VS2008 command line. 

-- Didrik

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

ohmeninea
@Luigi B. -- Building from git master checkout

@Didrik -- This did the trick (initially). Now I'm getting the following error (I changed /machine:i386 in setup.py  to /machine:x64, since I'm using 64-bit and I've built 64-bit quantlib in VS2008)

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LI
BPATH:C:\dev\QuantLib-1.5\lib "/LIBPATH:C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\ATLMFC\LIB" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Stud
io 9.0\VC\LIB" "/LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" /EXP
ORT:init_QuantLib build\temp.win-amd64-2.7\Release\QuantLib/quantlib_wrap.obj /O
UT:build\lib.win-amd64-2.7\QuantLib\_QuantLib.pyd /IMPLIB:build\temp.win-amd64-2
.7\Release\QuantLib\_QuantLib.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release
\QuantLib\_QuantLib.pyd.manifest /subsystem:windows /machine:X64
build\temp.win-amd64-2.7\Release\QuantLib/quantlib_wrap.obj : fatal error LNK111
2: module machine type 'X86' conflicts with target machine type 'x64'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\l
ink.exe' failed with exit status 1112
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

Didrik Pinte-5


On 27 March 2015 at 16:17, ohmeninea <[hidden email]> wrote:
@Luigi B. -- Building from git master checkout

@Didrik -- This did the trick (initially). Now I'm getting the following
error (I changed /machine:i386 in setup.py  to /machine:x64, since I'm using
64-bit and I've built 64-bit quantlib in VS2008)

I bet your command line tools are not set for using the 64bit programs. Can you try again but type this just after staring the MSVC command line:

vcvarsall amd64

and then compile the swig wrappers

-- Didrik

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

ohmeninea
Didrik Pinte-5 wrote
On 27 March 2015 at 16:17, ohmeninea <omega1337@gmail.com> wrote:

> @Luigi B. -- Building from git master checkout
>
> @Didrik -- This did the trick (initially). Now I'm getting the following
> error (I changed /machine:i386 in setup.py  to /machine:x64, since I'm
> using
> 64-bit and I've built 64-bit quantlib in VS2008)
>

I bet your command line tools are not set for using the 64bit programs. Can
you try again but type this just after staring the MSVC command line:

vcvarsall amd64

and then compile the swig wrappers

-- Didrik

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website,
sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for
all
things parallel software development, from weekly thought leadership blogs
to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Quoted from:
http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16422.html

Right again, Didrik!
Since I have VS2008 Express it was missing vcvarsamd64.bat, but I found one elsewhere, copied it into the VC9 folder, and called "vcvarsamd64" before running "python setup.py wrap" & "build."

At first I got this:

C:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -
IC:\Python27\include -IC:\Python27\PC -IC:\dev\QuantLib-1.5 "-IC:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\M
icrosoft Visual Studio 9.0\VC\INCLUDE" "-IC:\Program Files\Microsoft SDKs\Window
s\v6.0A\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC
\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" "-IC
:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -IC:\dev\boost_1_57_0 /TpQ
uantLib/quantlib_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\QuantLib/quantlib_
wrap.obj /GR /FD /Zm250 /EHsc /MD
quantlib_wrap.cpp
C:\dev\boost_1_57_0\boost/type_index.hpp(37) : warning C4068: unknown pragma
c:\program files (x86)\microsoft visual studio 9.0\vc\include\memory(404) : fata
l error C1128: number of sections exceeded object file format limit : compile wi
th /bigobj
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\a
md64\\cl.exe' failed with exit status 1

So I added "/bigobj" to the extra_compile_args list and it worked.

Thanks again, Didrik!
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble building QuantLib-SWIG python

nbalta02
In reply to this post by CptanPanic
I have experienced similar problems when I tried to build QuntLib-SWIG-1.2 for Python.
I am working on Windows 8.1, Visual Studio Express 2012.
I have installed boost_1_57_0, QuantLib-1.6 and tested QuantLib with Boost and works perfect.
I downloaded & installed swigwin-3.0.6 and then QuantLib-SWIG-1.2.
Having set all necessary environment vars, I tried to build QuantLib-SWIG-1.2, but I get the following errors;  Can somebody assist?
I followed the advise from previous posts but I still have the same problem.

I will be very grateful if you could help.

-------------------------------------------------------------------------------------------
C:\local\QuantLib-SWIG-1.2\Python>python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEB
G -D_WINDOWS -DNOMINMAX -IC:\Anaconda\include -IC:\Anaconda\PC -IC:\local\QuantLib-1.6 "-IC:\Program Files (x86)\Microsoft Visual Studio 12
0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Progr
m Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE" "-IC:\Program Files (x86)\
indows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\w
nrt" "-IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Pr
gram Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" -IC:\local\boost_1_57_0 /TpQuantLib
quantlib_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\QuantLib/quantlib_wrap.obj /GR /FD /Zm250 /EHsc /MD
quantlib_wrap.cpp
QuantLib/quantlib_wrap.cpp(5754) : error C2039: 'parse' : is not a member of 'QuantLib::DateParser'
        C:\local\QuantLib-1.6\ql/utilities/dataparsers.hpp(48) : see declaration of 'QuantLib::DateParser'
QuantLib/quantlib_wrap.cpp(5754) : error C3861: 'parse': identifier not found
QuantLib/quantlib_wrap.cpp(13323) : error C2039: 'includeReferenceDateCashFlows' : is not a member of 'QuantLib::Settings'
        C:\local\QuantLib-1.6\ql/settings.hpp(37) : see declaration of 'QuantLib::Settings'
QuantLib/quantlib_wrap.cpp(13650) : error C2039: 'Surface' : is not a member of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13650) : error C2873: 'Surface' : symbol cannot be used in a using-declaration
QuantLib/quantlib_wrap.cpp(13651) : error C2039: 'Domain' : is not a member of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13651) : error C2873: 'Domain' : symbol cannot be used in a using-declaration
QuantLib/quantlib_wrap.cpp(13653) : error C2065: 'Surface' : undeclared identifier
QuantLib/quantlib_wrap.cpp(13653) : error C2923: 'boost::shared_ptr' : 'Surface' is not a valid template type argument for parameter 'T'
QuantLib/quantlib_wrap.cpp(13654) : error C2678: binary '!' : no operator found which takes a left-hand operand of type 'boost::shared_ptr'
(or there is no acceptable conversion)
        C:\local\boost_1_57_0\boost/smart_ptr/detail/operator_bool.hpp(60): could be 'bool boost::shared_ptr<X>::operator !(void) const'
        while trying to match the argument list '(boost::shared_ptr)'
QuantLib/quantlib_wrap.cpp(13657) : error C2039: 'TestSurface' : is not a member of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13657) : error C2873: 'TestSurface' : symbol cannot be used in a using-declaration
QuantLib/quantlib_wrap.cpp(13658) : error C2065: 'Surface' : undeclared identifier
QuantLib/quantlib_wrap.cpp(13658) : error C2923: 'boost::shared_ptr' : 'Surface' is not a valid template type argument for parameter 'T'
QuantLib/quantlib_wrap.cpp(13661) : error C2061: syntax error : identifier 'TestSurface'
QuantLib/quantlib_wrap.cpp(13661) : error C2512: 'boost::shared_ptr' : no appropriate default constructor available
QuantLib/quantlib_wrap.cpp(19475) : error C2039: 'parse' : is not a member of 'QuantLib::DateParser'
        C:\local\QuantLib-1.6\ql/utilities/dataparsers.hpp(48) : see declaration of 'QuantLib::DateParser'
QuantLib/quantlib_wrap.cpp(19475) : error C3861: 'parse': identifier not found
.............................. more lines follow....

My ENVIRONMENT settings are:
=================================
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\nikos\AppData\Roaming
asl.log=Destination=file
CommandPromptType=Cross
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=WORK-PC
ComSpec=C:\WINDOWS\system32\cmd.exe
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs
FP_NO_HOST_CHECK=NO
Framework40Version=v4.0
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework\
FrameworkDIR32=C:\WINDOWS\Microsoft.NET\Framework\
FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
FrameworkVersion64=v4.0.30319
GDAL_DATA=C:\Program Files\PostgreSQL\9.4\gdal-data
HOMEDRIVE=C:
HOMEPATH=\Users\nikos
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;C:\local\boost_1_57_0
LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;
LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;''
LOCALAPPDATA=C:\Users\nikos\AppData\Local
LOGONSERVER=\\MicrosoftAccount
NUMBER_OF_PROCESSORS=8
OnlineServices=Online Services
OPENSSL_CONF=C:\Program Files\PostgreSQL\psqlODBC\0903\etc\openssl.cnf
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\HP SimplePass\x64;C:\Program Files (x86)\HP SimplePass\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\MATLAB\R2014a\bin;C:\Anaconda;C:\Anaconda\Scripts;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Anaconda;C:\Anaconda\Scripts;C:\local\swigwin-3.0.6
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PCBRAND=Pavilion
Platform=x64
POSTGIS_ENABLE_OUTDB_RASTERS=1
POSTGIS_GDAL_ENABLED_DRIVERS=GTiff PNG JPEG GIF XYZ DTED USGSDEM AAIGrid
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3c03
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
Python=C:\Anaconda
QL_DIR=C:\local\QuantLib-1.6
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\nikos\AppData\Local\Temp
TMP=C:\Users\nikos\AppData\Local\Temp
USERDOMAIN=WORK-PC
USERDOMAIN_ROAMINGPROFILE=WORK-PC
USERNAME=nikos
USERPROFILE=C:\Users\nikos
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
VisualStudioVersion=12.0
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\
windir=C:\WINDOWS
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\
================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble building QuantLib-SWIG python

Luigi Ballabio
It's a version mismatch. A few methods and classes that were available in QuantLib 1.2, have been deprecated and then removed in version 1.6.
Either upgrade QuantLib-SWIG to version 1.6, or downgrade QuantLib to version 1.2.

Luigi

On Thu, Jul 30, 2015 at 1:13 PM nbalta02 <[hidden email]> wrote:
I have experienced similar problems when I tried to build QuntLib-SWIG-1.2
for Python.
I am working on Windows 8.1, Visual Studio Express 2012.
I have installed boost_1_57_0, QuantLib-1.6 and tested QuantLib with Boost
and works perfect.
I downloaded & installed swigwin-3.0.6 and then QuantLib-SWIG-1.2.
Having set all necessary environment vars, I tried to build
QuantLib-SWIG-1.2, but I get the following errors;  Can somebody assist?
I followed the advise from previous posts but I still have the same problem.

I will be very grateful if you could help.

-------------------------------------------------------------------------------------------
C:\local\QuantLib-SWIG-1.2\Python>python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEB
G -D_WINDOWS -DNOMINMAX -IC:\Anaconda\include -IC:\Anaconda\PC
-IC:\local\QuantLib-1.6 "-IC:\Program Files (x86)\Microsoft Visual Studio 12
0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Progr
m Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files
(x86)\Microsoft Visual Studio 12.0\VC\INCLUDE" "-IC:\Program Files (x86)\
indows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows
Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\w
nrt" "-IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Pr
gram Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files
(x86)\Windows Kits\8.1\include\winrt" -IC:\local\boost_1_57_0 /TpQuantLib
quantlib_wrap.cpp
/Fobuild\temp.win-amd64-2.7\Release\QuantLib/quantlib_wrap.obj /GR /FD
/Zm250 /EHsc /MD
quantlib_wrap.cpp
QuantLib/quantlib_wrap.cpp(5754) : error C2039: 'parse' : is not a member of
'QuantLib::DateParser'
        C:\local\QuantLib-1.6\ql/utilities/dataparsers.hpp(48) : see
declaration of 'QuantLib::DateParser'
QuantLib/quantlib_wrap.cpp(5754) : error C3861: 'parse': identifier not
found
QuantLib/quantlib_wrap.cpp(13323) : error C2039:
'includeReferenceDateCashFlows' : is not a member of 'QuantLib::Settings'
        C:\local\QuantLib-1.6\ql/settings.hpp(37) : see declaration of
'QuantLib::Settings'
QuantLib/quantlib_wrap.cpp(13650) : error C2039: 'Surface' : is not a member
of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13650) : error C2873: 'Surface' : symbol cannot
be used in a using-declaration
QuantLib/quantlib_wrap.cpp(13651) : error C2039: 'Domain' : is not a member
of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13651) : error C2873: 'Domain' : symbol cannot be
used in a using-declaration
QuantLib/quantlib_wrap.cpp(13653) : error C2065: 'Surface' : undeclared
identifier
QuantLib/quantlib_wrap.cpp(13653) : error C2923: 'boost::shared_ptr' :
'Surface' is not a valid template type argument for parameter 'T'
QuantLib/quantlib_wrap.cpp(13654) : error C2678: binary '!' : no operator
found which takes a left-hand operand of type 'boost::shared_ptr'
(or there is no acceptable conversion)
        C:\local\boost_1_57_0\boost/smart_ptr/detail/operator_bool.hpp(60):
could be 'bool boost::shared_ptr<X>::operator !(void) const'
        while trying to match the argument list '(boost::shared_ptr)'
QuantLib/quantlib_wrap.cpp(13657) : error C2039: 'TestSurface' : is not a
member of 'QuantLib'
QuantLib/quantlib_wrap.cpp(13657) : error C2873: 'TestSurface' : symbol
cannot be used in a using-declaration
QuantLib/quantlib_wrap.cpp(13658) : error C2065: 'Surface' : undeclared
identifier
QuantLib/quantlib_wrap.cpp(13658) : error C2923: 'boost::shared_ptr' :
'Surface' is not a valid template type argument for parameter 'T'
QuantLib/quantlib_wrap.cpp(13661) : error C2061: syntax error : identifier
'TestSurface'
QuantLib/quantlib_wrap.cpp(13661) : error C2512: 'boost::shared_ptr' : no
appropriate default constructor available
QuantLib/quantlib_wrap.cpp(19475) : error C2039: 'parse' : is not a member
of 'QuantLib::DateParser'
        C:\local\QuantLib-1.6\ql/utilities/dataparsers.hpp(48) : see
declaration of 'QuantLib::DateParser'
QuantLib/quantlib_wrap.cpp(19475) : error C3861: 'parse': identifier not
found
.............................. more lines follow....

My ENVIRONMENT settings are:
=================================
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\nikos\AppData\Roaming
asl.log=Destination=file
CommandPromptType=Cross
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=WORK-PC
ComSpec=C:\WINDOWS\system32\cmd.exe
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
ExtensionSdkDir=C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs
FP_NO_HOST_CHECK=NO
Framework40Version=v4.0
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework\
FrameworkDIR32=C:\WINDOWS\Microsoft.NET\Framework\
FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
FrameworkVersion64=v4.0.30319
GDAL_DATA=C:\Program Files\PostgreSQL\9.4\gdal-data
HOMEDRIVE=C:
HOMEPATH=\Users\nikos
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\INCLUDE;C:\Program Files (x86)\Windows
Kits\8.1\include\shared;C:\Program Files (x86)\Windows
Kits\8.1\include\um;C:\Program Files (x86)\Windows
Kits\8.1\include\winrt;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\INCLUDE;C:\Program Files (x86)\Windows
Kits\8.1\include\shared;C:\Program Files (x86)\Windows
Kits\8.1\include\um;C:\Program Files (x86)\Windows
Kits\8.1\include\winrt;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\INCLUDE;C:\Program Files (x86)\Windows
Kits\8.1\include\shared;C:\Program Files (x86)\Windows
Kits\8.1\include\um;C:\Program Files (x86)\Windows
Kits\8.1\include\winrt;C:\local\boost_1_57_0
LIB=C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows
Kits\8.1\lib\winv6.3\um\x64;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows
Kits\8.1\lib\winv6.3\um\x64;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;
LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files
(x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files
(x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program
Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files
(x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program
Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files
(x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program
Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;''
LOCALAPPDATA=C:\Users\nikos\AppData\Local
LOGONSERVER=\\MicrosoftAccount
NUMBER_OF_PROCESSORS=8
OnlineServices=Online Services
OPENSSL_CONF=C:\Program Files\PostgreSQL\psqlODBC\0903\etc\openssl.cnf
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files
(x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files
(x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program
Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Program Files
(x86)\Microsoft Visual Studio
12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files
(x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files
(x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program
Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Program Files
(x86)\Microsoft Visual Studio
12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files
(x86)\MSBuild\12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files
(x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program
Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\bin\NETFX 4.5.1
Tools\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\HP
SimplePass\x64;C:\Program Files (x86)\HP SimplePass\;C:\Program Files
(x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program
Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL
SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL
SDK\3.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common
Files\Intel\WirelessCommon\;C:\Program
Files\MATLAB\R2014a\bin;C:\Anaconda;C:\Anaconda\Scripts;C:\Program Files
(x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft
SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL
Server\120\Tools\Binn\;C:\Program Files
(x86)\Skype\Phone\;C:\Anaconda;C:\Anaconda\Scripts;C:\local\swigwin-3.0.6
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PCBRAND=Pavilion
Platform=x64
POSTGIS_ENABLE_OUTDB_RASTERS=1
POSTGIS_GDAL_ENABLED_DRIVERS=GTiff PNG JPEG GIF XYZ DTED USGSDEM AAIGrid
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3c03
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
Python=C:\Anaconda
QL_DIR=C:\local\QuantLib-1.6
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\nikos\AppData\Local\Temp
TMP=C:\Users\nikos\AppData\Local\Temp
USERDOMAIN=WORK-PC
USERDOMAIN_ROAMINGPROFILE=WORK-PC
USERNAME=nikos
USERPROFILE=C:\Users\nikos
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
VisualStudioVersion=12.0
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools\
VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\
windir=C:\WINDOWS
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\
================================================================



--
View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16748.html
Sent from the quantlib-users mailing list archive at Nabble.com.

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

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

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: 答复: Having trouble building QuantLib-SWIG python

Luigi Ballabio
In reply to this post by ohmeninea
The /bigobj flag is already included in recent versions of QuantLib (see QuantLib-SWIG/Python/setup.py, around line 140).

Luigi


On Tue, Jun 13, 2017 at 11:09 AM TSchulz85 <[hidden email]> wrote:
Hi, I have exactely the same problem and running vcvarsall.bat also gets me
to the same new error, how do i "add "/bigobj" to the extra_compile_args
list"?



--
View this message in context: http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p18345.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users