Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 41 by
slidersj...@gmail.com: ctypesgen fails if given an
--includedir ( -I ) arg with spaces in the directory name
http://code.google.com/p/ctypesgen/issues/detail?id=41
What steps will reproduce the problem?
1. On a setup with Visual Studio 2008
2. ctypesgen.py -a -l c:\windows\syswow64\kernel32.dll -o kernel32.py
-I "c:\Program Files\Microsoft SDKs\Windows\v6.0A\Include" -I "
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" "c:\Program
Files\Microsoft SDKs\Windows\v6.0A\Include\windows.h"
What is the expected output? What do you see instead?
Expected: a kernel32.py module with many structs and function prototypes
What I see:
ERROR: gcc -E: gcc: error: Files\Microsoft: No such file or directory
ERROR: gcc -E: gcc: error: SDKs\Windows\v6.0A\Include: No such file or
directory
ERROR: gcc -E: gcc: error: Files: No such file or directory
ERROR: gcc -E: gcc: error: (x86)\Microsoft: No such file or directory
ERROR: gcc -E: gcc: error: Visual: No such file or directory
ERROR: gcc -E: gcc: error: Studio: No such file or directory
ERROR: gcc -E: gcc: error: 9.0\VC\include: No such file or directory
Afterwards, kernel32.py exists, but only with the basic template code.
What version of the product are you using? On what operating system?
svn checkout rev147
Please provide any additional information below.
Attached is a simple patch that fixes the issue.
The bug is passing the extra include dirs to the gcc command line without
surrounding them in quotes.
Patch to preprocess.py simply surrounds the -I command line args passed to
gcc withou quotes.
Attachments:
preprocessor.py.patch 530 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings