[docs] documentation bug in "embedding python"

Riccardo Rossi rrossi at cimne.upc.edu
Tue Dec 31 18:15:12 CET 2013


Dear developers,

i tried the simplest possible embedding described in

http://docs.python.org/3.3/extending/embedding.html#very-high-level-embedding

using python3.

the example code does not compile (from c++) with error:
/home/riccardo/scratch/kratospy3/embedded_python/krun_main.cpp: In function
‘int main(int, char**)’:
/home/riccardo/scratch/kratospy3/embedded_python/krun_main.cpp:8:28: error:
cannot convert ‘char*’ to ‘wchar_t*’ for argument ‘1’ to ‘void
Py_SetProgramName(wchar_t*)’
   Py_SetProgramName(argv[0]);  /* optional but recommended */
                            ^


what is the correct version for this?

if i define the main with wchar_t instead of char i get a warning...

thank you in advance
Riccardo

-- 

Dr. Riccardo Rossi, Civil Engineer

Member of Kratos Team

International Center for Numerical Methods in Engineering - CIMNE
Campus Norte, Edificio C1

c/ Gran Capitán s/n

08034 Barcelona, España

Tel:        (+34) 93 401 56 96

Fax:       (+34) 93.401.6517
web:       www.cimne.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20131231/0b79acb4/attachment-0001.html>


More information about the docs mailing list