   C++ and Python compile errors
  Hi,I am trying to use Python from inside a C++ program.At the time I am trying to use tutorials:http://docs.python.org/extending/embedding.htmlAs I am trying to build the simpiliest tutorial:#include <Python.h>intmain(int argc, char *argv[]){  Py_Initialize();  PyRun_SimpleString("from time import time,ctime\n" "print 'Today is',ctime(time())\n");  Py_Finalize();  return 0;}I get like thousands of errors (similar to those below):1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(162): error C2373: '_hypot' : redefinition; different type modifiers1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(138) : see declaration of '_hypot'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(162): error C2491: '_hypot' : definition of dllimport function not allowedI am using VC++ EE 2010, and Python 2.6. I have included (only) Python folder with include files *.h.What am I doing wrong? Should I include something else?
  This doesn't look right. You have 2 separate string arguments in PyRun_SimpleString with no comma separating them. Also, it looks like PyRun_SimpleString only accepts one argument anyway. This should either be 2 separate calls or concatenated into a single stringPyRun_SimpleString("from time import time,ctime\n""print 'Today is',ctime(time())\n");-me   ;  Two adjacentent string literals are concatenated at compile time automatically. Arguably, it is a misfeature as it makes it really easy to mess up a string array:const char *array[] = {   "Monday",   "Tuesday",   "Wednesday" // Whoops!   "Thursday",   "Friday",   // ...};As for the actual problem, have you looking into Python.h to see if it has any declarations that might interfere with _hypot? Searching your include path for this might yield results...   ;  Well, thanks for Your answers, but...just including python.h causes same errors so I don't think that's the reason.I can't even include python.h without getting an error (or bunch of them)It happens only when I make a windows form application. In case of console app. it works.[Edited by - Misery on November 19, 2010 5:10:19 AM]