Issue 164: Defect
Status:  Complete
Owner: ----
Closed:  Sep 2011
Reported by schmoo...@gmail.com, Mar 16, 2011
version 2.1.8

When I tried to install from source code i get error while compiling (python setup.py build), in file src/pyodbcmodule.cpp:919

[root@v pyodbc-v2.1.8]# pyodbc-v2.1.8/src/pyodbcmodule.cpp: In function ‘void initpyodbc()’:
[root@v pyodbc-v2.1.8]# pyodbc-v2.1.8/src/pyodbcmodule.cpp:919: error: invalid conversion from ‘const char*’ to ‘char*’
[root@v pyodbc-v2.1.8]# pyodbc-v2.1.8/src/pyodbcmodule.cpp:919: error:   initializing argument 3 of ‘int PyModule_AddStringConstant(PyObject*, char*, char*)’

I have changed line 
from 

const char* szVersion = TOSTRING(PYODBC_VERSION);

to 

char* szVersion = TOSTRING(PYODBC_VERSION);

and then it compiled successfully.


Mar 21, 2011
#1 lukedell...@gmail.com
This looks like the same problem that was reported in comments to  Issue 105 :
https://code.google.com/p/pyodbc/issues/detail?id=105#c6

It looks like it is fixed already in git, and should be in the next pyodbc release.
Sep 13, 2011
Project Member #2 mkleehammer
(No comment was entered for this change.)
Status: Complete