[PyQt] Problems using SIP with visual studio

Phil Thompson phil at riverbankcomputing.com
Sun May 31 15:57:56 BST 2015


On 30/05/2015 7:50 pm, Scener Spanish wrote:
> Hello all,
> 
> I've recently started my first steps learning SIP and I intend to use 
> it
> with visual studio 2010 to port some of my old c/c++ vs projects to 
> python.
> Before doing that I've decided to make work a very simple hello world
> package I've created to understand the very basics of SIP (workflow).
> Here's the package link
> <https://www.dropbox.com/s/yja7ptllso2x11m/test1.7z?dl=0>.with a simple 
> dll
> ready to go and an example application using it, as well as a sip 
> wrapper
> and a configure.py to create the makefile...
> 
> The steps I follow are these ones:
> 
> - I use Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 
> bit
> (AMD64)] on win32
> - I open a Microsoft Visual Studio 2010 x64 tools command prompt to 
> test
> the package
> - I compile & install succesfully sip 4.16.7
> - I'm able to create my c++ test dll and the c++ unit test application
> running the provided build.bat
> - I'm able to create the makefile using the attached configure.py using 
> #
> python configure.py
> - The problems appear when I try to build the python wrapper running 
> nmake,
> I got multiple errors and I don't understand their meaning, the visual
> studio output would be this:
> 
> ------------------------------------------------------------------------------------------------
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
>     cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 
> -DNDEBUG
> -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I. -IC:\Python275\include -Fo
> @C:\Users\KneDa\AppData\Local\Temp\nmF0E7.tmp
> siphellosipstdstring.cpp
> hellosip.sip(22) : error C2006: '#include' : expected a filename, found
> 'newline'
> hellosip.sip(22) : fatal error C1083: Cannot open include file: '': No 
> such
> file or directory
> siphellosipHelloSip.cpp
> C:\Program Files (x86)\Microsoft Visual Studio 
> 10.0\VC\INCLUDE\xlocale(323)
> : warning C4530: C++ exception handler used, but unwind semantics are 
> not
> enabled. Specify /EHsc
> hellosip.sip(22) : error C2006: '#include' : expected a filename, found
> 'newline'
> hellosip.sip(22) : fatal error C1083: Cannot open include file: '': No 
> such
> file or directory
> Generating Code...
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
> Studio
> 10.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
> Stop.
> ------------------------------------------------------------------------------------------------
> 
> Thanks a lot for any info.

The error messages describe the problem - there is no filename after the 
#include.

Phil


More information about the PyQt mailing list